Defines the expand/collapse button style.
Class: ItemClass
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET
public ExpandCollapseButtonStyleEnum ExpandCollapseButton { get; set; }
Public Property ExpandCollapseButton As ExpandCollapseButtonStyleEnumThe default value is ExpandCollapseButtonStyleEnum.Conditional.
Defines the expand/collapse button style.
This property can only be used for items in the item area.
using Softelvdm.SftTreeNET;
using Softelvdm.Controls;
namespace ExploreAssembly
{
public partial class Form1 : Form
{
// This example implements dynamically populating the tree control ("load as you go").
// As items are added, they are marked as expandable (ExpandCollapseButton =
// ExpandCollapseButtonStyleEnum.Show, even though no child items are added (yet).
// Once the user clicks on the expand/collapse button, the child items are added.
// The data displayed is created by loading an assembly and displaying defined
// types.
public Form1()
{
InitializeComponent();
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 ThenSee Also ItemClass Class | Classes | SftTree/NET 3.0