XtraLayoutControl – Layout Groups and Tabbed Groups
In this lesson, I’ll demonstrate how to join layout items into groups and arrange those groups into tabbed pages.
- First, I’d like to point out that I’ve skipped those steps where I added the “Product Name” TextEdit Control, and the “Unit Price” SpinEdit Control.
- To create a group, we first select the desired items by clicking them while holding down the shift key.
- Then, I right-click the multiple selection and choose the “Group” command from the context menu.
- I can create the second group in exactly the same way.
- Note that it isn’t necessary to have multiple items selected to create a group.
- You can create a group from just a single item.
- To ungroup layout items, just choose the “Ungroup” command.
- As you can see, a layout group represents a container of layout items and other groups (if any) within the XtraLayout Control.
- It has a border, and a caption that can optionally be hidden.
- To change the group’s caption, I can use its “Text” property.
- Let the first one here be “Categories”.
- Then I can specify the caption for the second group.
- This time, let it be “Products”
- The XtraLayout Control, enables images to be displayed with group captions.
- To do this, I first need to specify the source of the images.
- I select the layout control, and assign the source of images to the “CaptionImages” property.
- Then, I can select the “Categories” group for example, and specify the image to display within its caption.
- And I can do the same with the “Products” group.
- The XtraLayout Control enables the user to expand or collapse its groups.
- To enable this functionality for a particular group, I select the desired group, and show its “ExpandButton”.
- The “ExpandButtonLocation” property determines the location of this button when the group is displayed.
- Now, I can collapse and expand products.
- To conserve space on the form while arranging a large number of controls, you can arrange controls into tabbed pages.
- To create a tabbed page, you need to select a group and use the “Create Tabbed Group” command.
- To create a second tabbed page, I can simply drag the “Categories” group to the tab header area.
- End-users can create and customize tab groups in the same manner.
- They can freely create new tabs from existing groups, drag controls to and out of tab pages, re-order tabs while dragging them, and so on…
For more detailed information on using the XtraLayout Control, please see the documentation.