.


:




:

































 

 

 

 





Delphi - . , . .

, . .

, . ( ). , , .

, . Delphi, . . Windows, . . TMainMenu TPopupMenu . TTimer .

:

Tlipboard, ;

TScreen ;

TPrinter, Windows ;

TApplication ;

.

VCL

VCL TObject. . .

, , . VCL . . :

 

Var SomeList: TStrings;

..

SomeList:= TStrings.Create;

...

SomeList.Free;

 

. Tbject , . , Tbject .

Tersistent Tbject. . , .

Tomponent Delphi. . :

;

;

ActiveX , .

Tomponent , .

Tontrol, , , TWinControl. . Windows. . , . . , . , .

. , .

. , .

TObject

Tbject , , . .

, , , . :

 

Constructor Create;

 

TObject Destroy Free:

 

Destructor Destroy; Virtual;

Procedure Free

 

Destroy . Free, , , ( Nil). .

(, ), Free . .

, . TObject , .

ClassName: ShortString; , . , - :

 

Procedure TForm1.Button1Click(Sender: TObject);

Begin

If Sender.ClassName = TButton Then (Sender AS TButton).Enabled:= False;

If Sender.ClassName = TSpeedButton Then

(Sender AS TSpeedButton).Down:= True;

End;

 

ClassNamesIs (const Name: string): Boolean; , , Name. True.

TPersistent

Tersistent .

Assign (Source: TPersistent); . - , , :

 

FirstObject:= SecondObject;

 

, , , . Assign , .

Tersistent , , .

TComponent

Tomponent VCL. , . , .

Name . , , .. Delphi, , ( ) : Form1, Button2, Edit4 .. , .

Tag Longint , Delphi .

omponents , . Components , , , , .

Owner .

ComponentCount , .

ComponentIndex Components .

TControl

Tomponent , . , . .

Tontrol .

ControlState, :

 

Type TControlState = Set Of (csButtonDown, csClicked, csPalette, csReadingState,

csAlingnmentNeeded, csFocusing, csCreating, csCustomPaint,

csDestroyingHandle, csDocking);

 

Enabled. Enabled , , . Enabled True, , . Windows .

Height .

Width .

Left Top . .

ClientToScreen (const Point: TPoint): TPoint;

ScreenToClient (const Point: TPoint): TPoint;

 

ClientHeight: Integer, , ClientWidth: Integer, .

ClientOrigin: TPoint .

Toint :

 

Type TPoint = Record X: LongInt; Y: LongInt; End;

 

GetClientOrigin: Toint; Virtual .

Align , . : alNone ; alTop ; alBottom, alLeft, alRight , . Align , .

Anchors: Tnchors . Tnchors :

 

Type TAnchors = Set Of TAnchorsKind;

Type TAnchorsKind = (akTop, akLeft, akRight, akBottom);

 

, , .

AutoSize: Boolean (, , , ..).

Color . , : clBlack, clGreen, clBlue, clRed ..

Cursor , .

Font , (Color), (Size), (Style) .

Hint , OnHint, , . , .

ShowHint: Boolean. True , False .

Visible , . Visible True, , .

Caption , . . Caption , .

Text . , Temo Tdit Text.

Parent . Parent Owner . , , , .

ParentColor, ParentFont ParentShowHint , Color (), Font () ShowHint ( ) . , . , (, ) .

PopupMenu , . , AutoPopup True.

TControl - , , drag-and-dock (drag-and-drop).

TWinControl

, , : , .

TabOrder . , , [Tab].

SetFocus . , .

, , Focused: Boolean; Dynamic.

Brush .

Controls . , . .

ControlCount , .

Ctl3D: Boolean. True .

TGraphicControl

TGraphicControl , . Tontrol, TGraphicControl .

, , TLabel, , TImage, .

, Tanvas.

Canvas.

Canvas Delphi . Canvas , , . Cnvas , , , .





:


: 2016-11-18; !; : 2455 |


:

:

: , .
==> ...

1998 - | 1626 -


© 2015-2024 lektsii.org - -

: 0.031 .