TFormDesigner allows you move and resize any control on your form. You need not prepare your form to

源代码在线查看: life.txt.svn-base

软件大小: 717 K
上传用户: wuqiweipp
关键词: form your TFormDesigner control
下载地址: 免注册下载 普通下载 VIP

相关代码

				*****************************************************************
				 GREATIS DELPHI BONUS
				*****************************************************************
				
				 GREATIS DELPHI BONUS is a free, unsupported software.
				 To get the support please register your copy:
				 http://www.greatis.com/delphibonusreg.htm
				
				*****************************************************************
				 Life
				*****************************************************************
				
				About Life
				~~~~~~~~~~
				
				Greatis Life (TLife component) represents realization of known 
				Conway's algorithm "Life". You will see life of a new 
				civilization directly on your computer! It is beautiful and 
				entertaining!
				
				
				TLife component
				~~~~~~~~~~~~~~~
				
				Methods
				
				public
				
				constructor Create(AOwner: TComponent); override;
				destructor Destroy; override;
				procedure Paint; override;
				inherited methods
				
				procedure Lock;
				procedure Unlock;
				locks and unlocks drawing (see also Lock property)
				
				procedure Fill;
				fills the field (see also FillDensity property)
				
				procedure Clear;
				clears the field
				
				procedure NextGeneration
				generates next generation from current state
				
				function CellFromPoint(P: TPoint): TPoint;
				converts control coordinates to cell coordinate
				
				Properties
				
				public
				
				property SurviveCellCount: Integer; read-only
				contains survive cell count
				
				property XRange: Integer; read-only
				property YRange: Integer; read-only
				contains field size in cells
				
				property Generation: Integer; read-only
				contains generation number
				
				property Cells[X,Y: Integer]: TCellState; read/write
				set and get cell state
				TCellShape = (shSquare,shCircle,shOwnerDraw);
				
				property Canvas: TCanvas;
				inherited property
				
				published
				
				property BackgroundColor: TColor; read/write
				background color of the field
				
				property GridColor: TColor; read/write
				grid dots color
				
				property LonelinessColor: TColor; read/write
				property OvercrowdingColor: TColor; read/write
				property SurviveColor: TColor; read/write
				colors of cell states
				
				property CellSize: Integer; read/write
				size of the cell
				
				property EnableRandomLife: Boolean; read/write
				enable/disabe random life
				
				property RandomLife: Integer; read/write
				random life nascenty
				
				property CellShape: TCellShape; read/write
				shape of cells (see also OnDrawCell)
				TCellShape = (shSquare,shCircle,shOwnerDraw);
				
				property ShowGrid: Boolean; read/write
				show/hide grid
				
				property ShowDying: Boolean; read/write
				show/hide dying cells
				if False realises "Pure Conway"
				
				property Closed: Boolean; read/write
				if True field is closed by opposite sides
				
				property FillDensity: Boolean; read/write
				initial fill density (1/value) (see also Fill)
				
				property OnDrawCell: TDrawCellEvent; read/write
				user draw event (see also CellShape property)
				TDrawLifeCell = procedure(Sender: TObject; 
				  X,Y: Integer; R: TRect) of object;
				
				*****************************************************************			

相关资源