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



Spring Break!

Our offices will be closed this week (March 18 through March 22).

We'll be back March 24 to address any pending sales and support issues.