HeaderPane
Main
Hide
Share Link
Print

ExpandStyleEnum Enumeration

Used with the Expand method.

Class: (none)
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public enum ExpandStyleEnum;
Public Enum ExpandStyleEnum

Values

NameDescription
AllExpand all dependent items, including indirect dependent items resulting in all dependents fully expanded.
DirectOnlyExpand this item, collapse all its dependents.
SimpleExpand this item, leave its dependents unchanged.
RestoreLastExpand this item and restore all its dependents to their last saved state.

Comments

Used with the Expand method.

Examples

C#

        }

        private void ExpandCollapseItem(ItemClass item)
        {
            if (item.Expanded)
                item.Collapse(CollapseStyleEnum.SaveCurrent);
            else {
                if (item.HasChildren)
                    item.Expand(ExpandStyleEnum.RestoreLast);
                else {
                    sftTree1.Initializing = true;
                    if (item.TagString == "Single") {
                        item._CreateChildren = true;
                        ListInfo(item.Children, item.TagObject);
                    } else {
                        foreach (object o in item.TagObjects) {

VB.NET

    LoadAssembly(Assembly.GetExecutingAssembly())
End Sub

Private Sub ExpandCollapseItem(ByVal item As ItemClass)
    If item.Expanded Then
        item.Collapse(CollapseStyleEnum.SaveCurrent)
    Else
        If (item.HasChildren) Then
            item.Expand(ExpandStyleEnum.RestoreLast)
        Else
            sftTree1.Initializing = True
            If item.TagString = "Single" Then
                item._CreateChildren = True
                ListInfo(item.Children, item.TagObject)
            Else
                For Each o As Object In item.TagObjects

See Also | Classes | SftTree/NET 3.0