X Units
Last updated
Last updated
The X Units variable controls how a unit is horizontally positioned relative to its parent. By default an object is positioned relative to the left of its parent, where each unit represents 1 pixel.
The following shows a child ColoredRectangle positioned 50 Pixels From Left relative to its parent:
The following shows a child ColoredRectangle positioned 50 Pixels From Center relative to its parent:
The following shows a child ColoredRectangle positioned 50 Pixels From Right relative to its Parent:
The following shows a child ColoredRectangle positioned 50 Percentage Parent Width relative to its Parent. In other words, it will be positioned halfway between the left and right edges of the Parent: