Layouts are container objects which are used to visually organize graphical objects (controls), such as text, buttons and images on the screen.
There are 4 types of layouts:
Layouts are transparent by default but you can set a background image which can be tiled or stretched to fill the layout. You can also set a background color or background gradient.
You can add child objects to the Layout using the AddChild function: lay.AddChild( object );
The alignment of chlld objects within a layout can be set by adding the options
Linear Layouts
Linear layouts are probably the most useful type and are used to organize controls in either the default
By default Layouts will auto-size to wrap their contents but you have 3 more options as to how a layout sizes within it's parent:
Frame Layouts
Frame layouts are used to display objects in front or behind each other. Every time the AddChild function is called on a Frame layout, the child object is placed in a new layer in front of the previously added object at the top left of the frame.
Frame Layouts are useful if you wish to do animated Flips or Slides to reveal layers of objects or use transparency.
Absolute Layouts
Absolute layouts ignore all alignment options and allow the absolute positioning of controls by calling the SetPosition and SetSize functions of each of the child objects. However, you are encouraged use linear layouts for most of your programs, unless it is absolutely necessary.
Card Layouts
Card Layouts are just like frame layouts, but with rounded corners and a shadow by default.
They may be used to display offers with an image and optional info text.
Properties
The following properties are available on the Layout object:
Methods
The following methods are available on the Layout object: