TLabel
TLabel () . , Alt+, . Windows .
:
propertyAutoSize: Boolean; | , Caption |
propertyFocusControl: TWinControl; | , . |
TTextLayout = (tlTop, tlCenter, tlBottom); propertyLayout: TTextLayout; | : tlTop ; tlCenter ; tlBottom . |
propertyShowAccelChar: Boolean; | True, & -. |
propertyTransparent: Boolean; | . False, Color, . |
propertyWordwrap: Boolean; | / . AuroSize = False, Wordwrap = True . |
TEdit
TEdit . / .
:
propertyAutoSelect: Boolean; | , . |
propertyAutoSize: Boolean; | True BorderStyle = bsSingle, Font.Size. |
TBorderStyle = bsNone..bsSingle; propertyBorderStyle: TBorderStyle; | : bsNone - ; bsSingle - . |
TEditCharCase = (ecNormal, ecUpperCase, ecLowerCase); propertyCharCase: TEditCharCase; | : ecNormal ; ecUpperCase - ; ecLowerCase - . . |
propertyHideSelection: Boolean; | False, . |
propertyMaxLength: Integer; | . 0, . |
propertyModified: Boolean; | True, . |
propertyOnChange: TNotifyEvent; | OnChange, . |
propertyOEMConvert: Boolean; | True, MS-DOS Windows . |
propertyPasswordChar: Char; | PasswordChar , . . |
propertyReadonly: Boolean; | True, . |
propertySelLength: Integer; | . |
propertySelStart:Integer; | . |
property Text: String; | . |
|
|
:
procedureClear; | . |
procedureClearSelection; | . |
procedureCopyToClipboard; | Clipboard. |
procedureCutToClipboard; | Clipboard, . |
functionGetSelTextBuf(Buffer: PChar; BufSize: Integer): Integer; | BufSize Buffer. |
procedurePasteFromClipboard; | Clipboard, , Clipboard . |
procedureSelectAll; | . |
procedure SetSelTextBuf(Buffer:PChar); | Buffer, , Buffer . |
TButton
TButton .
:
propertyCancel: Boolean; | True, OnClick Esc. |
propertyDefault: Boolean; | True, lik Enter. |
TModalResult = Low(Integer)..High(Integer); propertyModalResult: TModalResult; | , (. ). |
Windows , , , . , . . ModalResult, ModalResult . Delphi ModalResult:
mrNone mrOk mrCancel mrAbort mrRetry | . . Cancel. Abort. Retry. | mrIgnore mrYes mrNo mrAll | Ignore. Yes. No. ll. |
TCheckBox
TCheckBox , / // . State , , . TCheckBox. , .
:
TLeftRight = (taLeftJustify, taRightJustify); propertyAlignment: TLeftRight; | : taLeftJustify ; taRightJustify . |
propertyAllowGrayed: Boolean; | / cbGrayed (He ). |
propertyChecked: Boolean; | /. cbUnchecked cbGrayed False. |
TCheckBoxState = (cbUnchecked, cbChecked, cbGrayed); propertyState: TCheckBoxState; | : cbUnchecked ; cbChecked ; cbGrayed . |
|
|
TRadioButton
TCheckBox, TRadioButton , . (, -) . , Checked. True, , , Checked False.
Checked TRadioButton Alignment, TCheckBox.
TMemo
. ( ), . m.
( ) ENTER. Windows . ENTER WantReturns. true, ENTER , , CTRL+ENTER.
Lines (), TStrings. , . , TStrings, :
Memo1.Lines.SaveToFile(':\Memo.TXT');
ScrollBars.
ssNone | |
ssHorizontal | |
ssVertical | |
ssBoth |
, WordWrap . , ( ).
SelStart , SelLength . S elText ( string).
SelectAll, ClearSelection.
, Clear, Undo, , , ClearUndo.
Windows. CopyToClipboard, CutToClipboard, PasteFromClipboard.
, OnChange.
|
|
TListBox
(TListBox) . , . .
Items TStrings , . Items (String List editor). Add () TStrings, Delete () . ItemIndex , ItemIndex 0. , ItemIndex 1. MultiSelect , . MultiSelect True, ItemIndex , . ItemIndex 0. SelCount , Selected , . Sorted , . Style . , , Style, . , .
TComboBox
(TComboBox) . . , TEdit TListBox. Style
. Enter. .
(TOpenDialog)
.
TOpenDialog:
DefaultExt | , . , |
FileName | |
Files | . Options ofAllowMultiSelect |
Filter | , . : , |. . | |
FilterIndex | . 1 |
HistoryList | ( TStrings) |
InitialDir | , |
Options | , |
Title |
function GetStaticRect: TRect;
( ), ( ).
|
|
TOpenDialog:
OnCanClose | . |
OnFolderChange | |
OnIncludeItem | . , |
OnSelectionChange | |
OnTypeChange | ( Filter) |
( OpenDialogl), , , .PAS. FilterIndex 2.
procedure TForml.ButtonlClick(Sender: TObject);
Begin
OpenDialogl.Filter:= ' (*. *) |*.*|
(*.pas)|*.PAS';
OpenDialogl.Title:= ' ';
OpenDialogl.FilterIndex:= 2;
if OpenDialogl.Execute then
Begin
AssignFile(F, OpenDialogl.FileName);
// F
end; end;
(TSaveDialog)
TOpenDialog , .
TStringGrid
Excel . Delphi 5 , , , , .
, , ( ). , , , .
Cells, . , .
: .
ColCount, RowCount.
, ( 5x5 ), 10x10 , .
procedure TForm1.FormCreate(Sender: TObject);
Varc,r: integer; begin
StringGrid1.ColCount:= 10; StringGrid1.RowCount:= 10; for := 0 to StringGrid1.ColCount-1 do for r:= 0 to StringGrid1.RowCount-1 do StringGrid1.Cells[c,r]:=
'(' + IntToStr(c) + ',' + IntToStr(r) + ')'; end;
, , , . .
: , , FixedCols FixedRows. , 0.
. Col Row TStrings, .
( TObject), Objects, , Cells, , . , , , . Objects .
, :
BorderStyle | . Ctrl3D |
Ctrl3D | |
ColWidths | , |
DefaultColWidth | |
DefaultDrawing | true, . OnDrawCell, |
DefaultRowHeight | |
FixedColor | , |
GridHeight | ( ) |
GridLineWidth | ( ) , |
GridWidth | ( ) |
Options | ( set of TGridOption), : , . , , true goRowSizing goColSizing, Options. , true goEditing |
RowHeights | , |
ScrollBars | |
VisibleColCount | ( ) |
|
|
TImage
, , .
. Picture ( TPicture), (.), , Windows . TPicture () Delphi 5, VCL , .
: Bitmap ( TBitmap), Icon (, TIcon) Metafile ( TMetafile, Windows.EMF). Graphic. ( ) Width Height.
Image , ( ) . Width Height.
Picture, , .BMP,.ICO, JPG Windows.
TChart
, (, Delphi 5, 4.02). - , TPanel .
: ( ) .
File > New > Business > TeeChart Wizard ( > > > ), . . , Non Database Chart (He ). . 2D/3D.
Show Legend ( ) , . Show Marks .
. Finish () , Chart1. .
, Chart1.
Chart (), .
ü Series ( ) . Add (). , Functions (): (Add), (Subtract), (Multiply), (Divide), (High), (Low) (Average) .
ü General () :
Export ();
( ) Margins ();
Zoom ();
Allow Scroll ( ).
ü Axis () , , , , .
ü Titles () .
ü Legend () .
ü Panel () -, .
ü Pages () . Points per Page ( ), .
ü Walls () .
ü 3D . .
Series ( ) ( , Chart). Area ().
Data Source ( ). (Random Values), (No Data) ( Function) . Selected Series ( ) >.
Add, .
function AddXY (Const AXValue, AYValue: Double; Const AXLabel: String; AColor: TColor): Longint;
, , Button1 .