HeaderPane
Main
Hide
Share Link
Print

Expandable Property, SftBoxItem Object

Defines whether the item is expandable.

Syntax

Get

C#bool Boolean = object.Expandable;
VB.NETBoolean = object.Expandable As Boolean
C++VARIANT_BOOL Boolean = object->Expandable;
VARIANT_BOOL Boolean = object->GetExpandable();
CHRESULT object->get_Expandable(VARIANT_BOOL* Boolean);

Put

C#bool object.Expandable = Boolean;
VB.NETobject.Expandable = Boolean As Boolean
C++VARIANT_BOOL object->Expandable = Boolean;
void object->PutExpandable(VARIANT_BOOL Boolean);
CHRESULT object->put_Expandable(VARIANT_BOOL Boolean);

object

A SftBoxItem object.

Boolean

Defines whether the item is expandable.

BooleanDescription
TrueThe item is expandable.
FalseThe item is not expandable.

Comments

The Expandable property defines whether the item is expandable.

Normally, only a parent item (with dependents) is expandable. An expandable item displays an expand/collapse button and other attributes, such as the Items.ItemImageExpandable graphic.

A leaf item can be made a "temporary" parent item by setting the item's Expandable property to True. The item now displays an expand/collapse button and other attributes, such as the Items.ItemImageExpandable graphic. The item can now also generate an ItemClick event to expand the item. The application can then add child items as the user expands this "temporary" parent item, making it into a real parent item.

When setting the Expandable property, an item's dependents are always removed, unless the item is already expanded.

If an item's Expandable property is set to False, the item is collapsed (and its dependents are removed).

If an item is already expanded or has dependents when setting Expandable to True, the item remains unchanged. It is not expanded.

Examples

C# View entire sample code

            case SftBoxAreaConstants.areaSftBoxLabel:
                if (e.part == SftBoxPortionConstants.partSftBoxDropDown)
                    axSftBox1.DropDown.Suppress(); // Make sure we don't close the drop down
                ToggleImage(axSftBox1.get_Item(e.itemIndex).LabelImage);
                break;
            case SftBoxAreaConstants.areaSftBoxItem:
                if (e.part == SftBoxPortionConstants.partSftBoxDropDown)
                    axSftBox1.DropDown.Suppress(); // Make sure we don't close the drop down
                if (axSftBox1.get_Item(e.itemIndex).Expandable)
                    ExpandCollapseItem(e.itemIndex, e.shift);
                else
                    ToggleImage(axSftBox1.get_Item(e.itemIndex).Image);
                break;
            case SftBoxAreaConstants.areaSftBoxButton:
            case SftBoxAreaConstants.areaSftBoxCell:
                if (e.part == SftBoxPortionConstants.partSftBoxDropDown)

VB.NET View entire sample code

            If e.part = SftBoxPortionConstants.partSftBoxDropDown Then
                AxSftBox1.DropDown.Suppress() ' Make sure we don't close the drop down
            End If
            ToggleImage(AxSftBox1.get_Item(e.itemIndex).LabelImage)
        Case SftBoxAreaConstants.areaSftBoxItem
            If e.part = SftBoxPortionConstants.partSftBoxDropDown Then
                AxSftBox1.DropDown.Suppress() ' Make sure we don't close the drop down
            End If
            If AxSftBox1.get_Item(e.itemIndex).Expandable Then
                ExpandCollapseItem(e.itemIndex, e.shift)
            Else
                ToggleImage(AxSftBox1.get_Item(e.itemIndex).Image)
            End If
        Case SftBoxAreaConstants.areaSftBoxButton, SftBoxAreaConstants.areaSftBoxCell
            If e.part = SftBoxPortionConstants.partSftBoxDropDown Then
                AxSftBox1.DropDown.Suppress() ' Make sure we don't close the drop down

C++ View entire sample code

    case areaSftBoxLabel:
        if (Part == partSftBoxDropDown)
            m_vBox->DropDown->Suppress(); // Make sure we don't close the drop down
        ToggleImage(m_vBox->Item[ItemIndex]->LabelImage);
        break;
    case areaSftBoxItem:
        if (Part == partSftBoxDropDown)
            m_vBox->DropDown->Suppress(); // Make sure we don't close the drop down
        if (m_vBox->Item[ItemIndex]->Expandable != VARIANT_FALSE)
            ExpandCollapseItem(ItemIndex, Shift);
        else
            ToggleImage(m_vBox->Item[ItemIndex]->Image);
        break;
    case areaSftBoxButton:
    case areaSftBoxCell:
        if (Part == partSftBoxDropDown)

See Also SftBoxItem Object | Object Hierarchy


Last Updated 11/22/2026 - (email)
© 2026 Softel vdm, Inc.