Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

ExpandCollapseButton Property, ItemClass Class

Defines the expand/collapse button style.

Class: ItemClass
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public ExpandCollapseButtonStyleEnum ExpandCollapseButton { get; set; }
Public Property ExpandCollapseButton As ExpandCollapseButtonStyleEnum

Value

The expand/collapse button.

The default value is ExpandCollapseButtonStyleEnum.Conditional.

Comments

Defines the expand/collapse button style.

This method can only be used for items in the item area.

Examples

C#

                return;
            }
            LoadAssembly(asm);
        }

        private void ListInfo(ItemCollectionClass itemCollection, Assembly a) {
            ItemClass item = itemCollection.Add("Custom Attributes");
            item.TagObjects = a.GetCustomAttributes(true);
            item.ExpandCollapseButton = item.TagObjects.Length > 0 ? ExpandCollapseButtonStyleEnum.Show : ExpandCollapseButtonStyleEnum.Hide;

            item = itemCollection.Add("Exported Types");
            item.TagObjects = a.GetExportedTypes();
            item.ExpandCollapseButton = item.TagObjects.Length > 0 ? ExpandCollapseButtonStyleEnum.Show : ExpandCollapseButtonStyleEnum.Hide;

            item = itemCollection.Add("Files");
            item.TagObjects = a.GetFiles();

VB.NET

    LoadAssembly(asm)
End Sub

Private Sub ListInfo(ByVal itemCollection As ItemCollectionClass, ByVal a As Assembly)

    Dim item As ItemClass = itemCollection.Add("Custom Attributes")
    item.TagObjects = a.GetCustomAttributes(True)
    If item.TagObjects.Length > 0 Then
        item.ExpandCollapseButton = ExpandCollapseButtonStyleEnum.Show
    Else
        item.ExpandCollapseButton = ExpandCollapseButtonStyleEnum.Hide
    End If

    item = itemCollection.Add("Exported Types")
    item.TagObjects = a.GetExportedTypes()
    If item.TagObjects.Length > 0 Then

See Also ItemClass Class | Classes | SftTree/NET 2.0