Setting Anchors for Elements

Top  Previous  Next

By setting the sub-properties of this property of an element you can instruct the Application Studio to position and size the element depending on its parent.

anchorleft

Set anchor to the left

anchortop

Set anchor to the top

anchorright

Set anchor to the right

anchorbottom

Set anchor to the bottom

 

 

Example:

Assume that a panel element has two elements, one Text and one Edit Box. Set "Left" and "Right" anchors for the text element and "Right" anchor for the edit box.

beforeanchor

 

Now resize the panel to increase its width.

afteranchor

The edit box element kept its distance to the right and the text element kept distances to both sides (left and right) and therefore its width is increased along with panel element.