DesktopX 2.4 Developer’s Guide
_____________________________________________________________________________
_____________________________________________________________________________
Page 27
3.4 Groups, Parents and Children
When developing you will soon realize that many of the best objects are created by several
objects working together. For example, consider a simple 'button' made up of a single image.
Whilst this may be a good object, it's not very flexible. For example, if you want another similar
button you have to create an entire new graphic; text on the button cannot be changed
dynamically, the font cannot change, if you share the object it may not be relevant.
Now, consider creating that button from a background image and a separate text object. All of a
sudden it is much more flexible as the text element can easily be changed and all the above
problems are gone.
One problem that remains however is the fact that you need to ensure that these objects work
together as a single unit. Groups, Parents and Children make this very easy.
If you want several objects to work together is to assign them to the same ‘Group’.
Groups
An object's Group is defined on its “Summary” tab. Any predefined groups are available in a
combo box so you can allocate an object to that, or you can simply type in a group name to
create a new group. Alternatively you can select one of more objects, right-click and click Group
from where you can get the same options.
Once a group exists, objects within that group share some basic functionality.
All objects in a group move together, so as you drag one, all other objects in the group move at
the same time. Note that you can hold down CTRL when dragging to just move that single
object.
Also, as we saw earlier, popups work well with groups. All objects in a group popup or hide
together.
Note that you can remove an object or objects from a group by clearing the content of the 'Group'
field in its properties.