- LiveCode Mobile Development Cookbook
- Dr Edward Lavieri
- 228字
- 2021-08-05 18:04:01
Aligning interface objects
The mobile apps we develop can have several objects on the screen simultaneously. It is important that these objects line up and not look haphazard. LiveCode provides us with tools to make aligning our objects relatively easy.
How to do it...
Perform the following steps to align interface objects:
- Create a new main stack.
- Drag two or more objects on the stack's card. For example, drag two button objects to the card.
- Select the objects you want to align. To do this, click on the first object, and then, while holding the Shift key, click on the remaining objects you want to align. When you are finished selecting the objects, release the Shift key.
Note
When selecting multiple objects to align, it is important that you ensure the first object you select is the one you want to use as a reference. For example, you might want to align selected objects by the left ledge of the first object you selected.
- Click on the icon on the toolbar. This will bring up the property inspector.
- Select the Align Objects section of the property inspector:
- Select one or more of the six alignment buttons (top, bottom, left, right, middle, or center) to align your objects.
How it works...
Aligning the objects via the property inspector saves us time when creating and laying out the human-computer interface.