Collapses the item so its dependents are hidden.
Class: ItemClass
Namespace: Softelvdm.SftBoxNET
Assembly: Softelvdm.SftBoxNET
public void Collapse( CollapseStyleEnum Style );
Public Sub Collapse( ByVal Style As CollapseStyleEnum )Defines how the item and its dependents are collapsed.
Collapses the item so its dependents are hidden.
This method can only be used for items in the item area.
public Form1() {
InitializeComponent();
boxes = new SftBox[] { sftBox1, sftBox2, sftBox3, sftBox4, sftBox5, sftBox6, sftBox7 };
sftBox1.SelectedItem = sftBox1.Items[5];
sftBox2.SelectedItem = sftBox2.Items[0].Children[1];
// with the Build phase collapsed, the rows shown, all items and the outline are numbered differently
sftBox7.Items[1].Collapse(CollapseStyleEnum.All);
// the installed fonts, each name shown in its own font, with an image for TrueType and OpenType fonts
sftBox3.FillFontNames(FontListOptionsEnum.ShowInFont | FontListOptionsEnum.ShowTypeImage);
sftBox3.Text = "Segoe UI";
if (sftBox3.SelectedItem == null && sftBox3.Items.Count > 0)
sftBox3.SelectedItem = sftBox3.Items[0];
Public Sub New()
InitializeComponent()
boxes = New SftBox() {SftBox1, SftBox2, SftBox3, SftBox4, SftBox5, SftBox6, SftBox7}
SftBox1.SelectedItem = SftBox1.Items(5)
SftBox2.SelectedItem = SftBox2.Items(0).Children(1)
' with the Build phase collapsed, the rows shown, all items and the outline are numbered differently
SftBox7.Items(1).Collapse(CollapseStyleEnum.All)
' the installed fonts, each name shown in its own font, with an image for TrueType and OpenType fonts
SftBox3.FillFontNames(FontListOptionsEnum.ShowInFont Or FontListOptionsEnum.ShowTypeImage)
SftBox3.Text = "Segoe UI"
If SftBox3.SelectedItem Is Nothing AndAlso SftBox3.Items.Count > 0 Then
SftBox3.SelectedItem = SftBox3.Items(0)
End IfSee Also ItemClass Class | Classes | SftBox/NET 3.0