RAD Studio VCL Reference
|
Specifies the horizontal coordinate of the left edge of a component relative to its parent.
property Left: Integer;
__property int Left;
Use the Left property to determine where the left side of the control begins or to reposition the left side of the control.
If the control is contained in another control, the Left and Top properties are relative to the parent control. If the control is contained directly by the form, the property values are relative to the form. For forms, the value of the Left property is relative to the screen in pixels.
C++ Examples:
/* Place a TTimer object in the form and enter Timer1Timer in the OnTimer event. Place other controls in the form and change the active control at runtime. The following event handler responds to timer events by moving the active control one pixel to the right every 100 miliseconds: */ void __fastcall TForm1::Timer1Timer(TObject *Sender) { Timer1->Interval = 100; if (ActiveControl) ActiveControl->Left = ActiveControl->Left + 1; }
Delphi Examples:
{ Place a TTimer object in the form and enter Timer1Timer in the OnTimer event. Place other controls in the form and change the active control at runtime. The following event handler responds to timer events by moving the active control one pixel to the right every 100 miliseconds: } procedure TForm1.Timer1Timer(Sender: TObject); begin Timer1.Interval := 100; if ActiveControl <> nil then ActiveControl.Left := ActiveControl.Left + 1; end;
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|