Center - AppDaddy-Software-Solutions-Inc/framework-markup-language GitHub Wiki
The CENTER widget centers its child within its parent. If the parent has no constraints, CENTER will size itself to the first constraints found within the widget tree and center its children within those constraints.
- Overview
- Usage
- Attributes :: VisibleWidget (inherited attributes)
- Examples - (fig. a) - (img. a)
- Other Widgets You May Find Useful:
CENTER is best used to center a single child within its parent.
- Used with a single child inside of it, which in turn may contain multiple children.
- If
CENTERwraps multiple children, it will place those children in a stack, causing the children to overlap. - If there are no constraints imposed by the parent,
CENTERwill walk up the tree and use constraints of the closest parent, with the screen size being the highest level. - If a widget has siblings, consider using the
centerattribute onBOX,ROW(./Row) orCOLUMN(./Column).
Attributes :: VisibleWidget (inherited attributes)
| Name | Type | Default | Description | Req |
|---|
An XML example of an ICON centered with a BOX.
<FML>
<BOX width="300" height="500" elevation="10" color="blue">
<CENTER>
<ICON icon="lens" color="red"/>
</CENTER>
</BOX>
</FML>
