Navigation:  Reference > Form Objects > Common Properties >

Anchors

Print this Topic Previous pageReturn to chapter overviewNext page

 

This property is used to literally anchor the object to a position on the form so that if the user changes the size of the form the object will either stay where it is or move with the appropriate side or top/bottom.  This is a multi part property.  There are four possible values that can be set to TRUE or FALSE.  If you set all four options to TRUE for a single object, it will grow if the user makes the form larger and shrink if the form gets smaller.  The four possible values are:

 

akLeft - True or False - If this is set to True the object will stay at the same position relative to the left side of the form.

 

akTop - True or False - If this is set to True the object will stay at the same position relative to the top of the form.

 

akRight - True or False - If this is set to True the object will stay at the same position relative to the right side of the form.

 

akBottom - True or False - If this is set to True the object will stay at the same position relative to the bottom of the form.

 

The default value for this property is akLeft and akTop are set to True and akRight and akBottom or set to False.  This means the object will stay in the same position relative to the top left corner of the form, and, if the form gets larger, there may be more empty space to the right or bottom.  If you want the object to grow with the form (or shrink) set all four properties to True.  If you want the object to anchor itself to the right side, or right side bottom of the form, set akLeft and akTop to False, and akRight and akBottom to True.

 

Once you have set the anchors you can see what the results will be by enlarging/shrinking the size of the form during design.

 

This property cannot be modified during runtime.

 

Also see Constraints for an additional property that can effect size during runtime.

 


Page url: http://www.cassoftware.com/tas/manual/anchor.htm