You are hereDocumentation / 6. Common property / 6.1 anchors

6.1 anchors


Anchors is useful to set the layout of a widget in the widget container. As in the picture below :

 anchors

 Available sub properties are : 

  • an_left: the left position of widget follows the left position of widget container. 
  • an_top: the top position of widget follows the top position of widget container. 
  • an_right: the right position of widget follows the right position of widget container. 
  • an_bottom: the bottom position of widget follows the bottom position of widget container. 

If an_left, an_top, an_right, and an_bottom value is set to "true", then the widget will meet all container widgets.

 

If you will set these sub properties using code, you should set anchors value with set anchors type.

tbutton1.anchors:= [an_left,an_top];

tbutton1.anchors:= [an_left,an_top,an_right,an_bottom];

tbutton1.anchors:= tbutton1.anchors + [an_left,an_top];

tbutton1.anchors:= tbutton1.anchors - [an_top];