Design How-To / General design |
Use properties to center elements.
To center an element in its parent container you can set its properties as described in Table 1
Property | Value |
---|---|
x | max/2 |
y | max/2 |
anchorx | 0.5 |
anchory | 0.5 |
An x and y value of max/2 sets the x and y coordinates of the element to the maximum of its parent container divided by 2. An anchorx and anchory value of 0.5 sets the attachment point to the center of the element.