Please enable JavaScript to view this site.

DAQFactory User's Guide

Navigation: 7 Pages and Components

7.5 Grouping Components

Scroll Prev Top Next More

Like many object drawing applications, you can group several components into a single component.  By doing this, you can move all the components in the group as one.  To group components, select multiple components and go to Edit - Group Components.  The resulting group will be selected.  A selected group of components displays a slightly different box around the group to show you that you have a group selected.  To ungroup a group, select just the group and go to Edit - Ungroup Components.  

Groups can be resized using the normal handles when selecting.  This will cause all the components in the group to resize proportionately as well.

You can edit the contents of a group by selecting it, then right clicking and selecting Edit Group, or use the keyboard shortcut Shift-Enter.  This will cause all the other components on the page to fade.  You can then manipulate any of the components inside the group, and add or remove components to the group.  When you are done, simply right click and select Exit Edit Group, or press Shift-Enter again.

You can also select and move individual components within a group without editing the entire group either by Alt-Ctrl-Clicking the component, or by selecting the desired component from the workspace under the group.

A group of components is actually a component itself, a container really.  This means you can group groups of components as well.  As we will discuss more later, this also means that the group itself has events, local variables and all the features of regular components.  This allows you to assemble several components into a group, add some code for advanced features, and thus create essentially a new component.  This is discussed a bit later in this chapter.  Normally, if you group several components, and then subsequently ungroup the components, the group "container" itself is deleted, and you are basically left exactly how you started.  If, however, you add event code or user functions to your group container and then ungroup the components, the group container will not be deleted and instead will remain on the screen, painting itself as a green X.  You can delete this group "component" if you want, or if you want to reassemble the group and keep the code, simply include the original green X group component when selecting the components to group.  All the other components will be placed inside this already existing group and the code will remain.

Note: you cannot include two standalone group components in a single group.  This will only take the code of one of the two group components.

Note: all contained components in a group will search the scope of the group itself after checking their own variables.  This allows you to create a property of the group that is then accessible by all the contained controls.