Ungroup;
The Ungroup method ungroups elements.
The Ungroup method ungroups all elements of a group. If several groups are selected, the method ungroups the first of the selected groups.
To group elements, use the ITabObjects.GroupSelected method.
Executing the example requires a form with the Button1 button located on it, the TabSheetBox component, and the UiTabSheet component named UiTabSheet1, that is used as a data source for TabSheetBox. The objects created in the table should be grouped. The link to the Tab system assembly should be added.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Tab: ITabSheet;
TabObj: ITabObject;
TabObjGr: ITabObjectGroup;
Begin
Tab := UiTabSheet1.TabSheet;
TabObj := Tab.Objects.SelectedObject(0);
TabObjGr := TabObj As ITabObjectGroup;
If TabObjGr <> Null Then
TabObjGr.Ungroup;
End If;
End Sub Button1OnClick;
After executing the example all group objects are ungrouped.
See also: