ITabObjectGroup.Ungroup

Fore Syntax

Ungroup;

Fore.NET Syntax

Ungroup();

Description

The Ungroup method ungroups elements.

Comments

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.

Fore Example

To execute the example a form with a button named Button1 on it, the TabSheetBox component, and the UiTabSheet component named UiTabSheet1, that is used as a data source for TabSheetBox are required. 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.

Fore.NET Example

To execute the example a .NET form with a button named button1 on it, the TabSheetBoxNet component, and the UiTabSheetNet component named uiTabSheetNet1, that is used as a data source for TabSheetBoxNet. The object created in the table should be grouped are required. The link to the Tab system assembly should be added.

Imports Prognoz.Platform.Interop.Tab;
...
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    Tab: ITabSheet;
    TabObj: ITabObject;
    Group: ITabObjectGroup;
Begin
    Tab := uiTabSheetNet1.TabSheetUi.TabSheet;
    TabObj := Tab.Objects.SelectedObject[0];
    Group := TabObj As ITabObjectGroup;
    If Group <> Null Then
        Group := TabObj.ParentGroup;
    End If;
    Group.Ungroup();
End Sub;

After executing the example all group objects are ungrouped.

See also:

ITabObjectGroup | ITabObjects.GroupSelected