Creating Layout Groups
- 2 minutes to read
This topic shows how you can create layout groups at design and runtime.
Creating Groups at Design Time
Adjacent layout items can be combined into a group at design time using the Context Menu.
Select the items that you need to group by clicking them while holding the SHIFT key down.
Clicking a layout item's control selects this control but not the item. In this instance, you can press the ESC key to select the layout item that owns the currently selected control.
- Invoke the context menu and select the Group command.
A new group will be created and the selected items will be added to this group.
Click the created group's caption to access and modify the group's settings (name, caption, indents, etc.) in the Properties grid.
Creating Groups at Runtime
Layout groups can be created at runtime using the following methods.
- The LayoutControlGroup.AddGroup method creates a new group and adds it to the current group.
- The LayoutControl.AddGroup method creates a new group and adds it to the root group.
- The group's constructor. This group then needs to be added to another group using the LayoutGroup.Add or LayoutGroup.Move method.
- How to: Create layout groups and items in code
- How to: Create a layout in Regular mode in code
- How to: Create a tabbed group in code