SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Defines whether the item is expanded or collapsed.
Get
VB.NET | Boolean = object.Expanded As Boolean |
VB | Boolean = object.Expanded As Boolean |
C#.NET | bool Boolean = object.Expanded; |
VC++ | VARIANT_BOOL Boolean = object->Expanded; VARIANT_BOOL Boolean = object->GetExpanded(); |
C | HRESULT object->get_Expanded(VARIANT_BOOL* Boolean); |
Put
VB.NET | object.Expanded = Boolean As Boolean |
VB | object.Expanded = Boolean As Boolean |
C#.NET | bool object.Expanded = Boolean; |
VC++ | VARIANT_BOOL object->Expanded = Boolean; void object->PutExpanded(VARIANT_BOOL Boolean); |
C | HRESULT object->put_Expanded(VARIANT_BOOL Boolean); |
object
Boolean
Defines whether the item is expanded or collapsed.
Boolean | Description |
---|---|
True | The item is expanded. |
False | The item is collapsed. |
The Expanded property defines whether the item is expanded or collapsed.
When setting Expanded to True, only an item's immediate dependents are made visible. Dependents of items that are made visible are not automatically made visible. The Items.Expand and Item.Expand method can be used to expand all immediate and indirect dependents.
If an item is already expanded when setting Expanded to True, the item remains unchanged. It does not hide any indirect dependents. To make sure that an item's indirect dependents are not shown, Expanded can be set to False first, which collapses the item (and all dependents), followed by setting Expanded to True. Now only immediate dependents are visible.
An item has to be currently shown to be expanded or collapsed. If the item is not shown, its state cannot be modified. The Item.Shown property can be used to determine if an item is shown.
The Item.DependentCount property can be used to determine if an item can be expanded. If an item doesn't have any dependents, it is a leaf item and cannot be expanded. However, it is not an error to use Expanded with a leaf item.
The Expanded property does not preserve or restore the expand/collapse state of its dependent items. Use Items.Expand, Item.Expand, Items.Collapse and Item.Collapse to preserve or restore this information.
If a parent item is collapsed, subsequently adding child items will automatically expand the item.
AxSftBox1.Items.Selection = 0 CopyImageFromCurrentItem() End Sub Private Sub ExpandCollapseItem(ByVal ItemIndex As Long, ByVal Shift As Short) Dim Item As SftBoxItem Item = AxSftBox1.get_Item(ItemIndex) If Item.Expanded Then Item.Collapse(True) Else Item.Expand(True, (Shift And SftBoxKeyConstants.constSftBoxCtrlMask)) End If End Sub Private Sub AxSftBox1_ItemClick(ByVal sender As Object, ByVal e As AxSftBoxLib50._ISftBoxEvents_ItemClickEvent) Handles AxSftBox1.ItemClick
End With SftBox1.DropDown.Dropped = True End Sub Private Sub ExpandCollapseItem(ByVal ItemIndex As Long, ByVal Shift As Integer) Dim Item As SftBoxItem Set Item = SftBox1.Item(ItemIndex) If Item.Expanded Then Item.Collapse True Else Item.Expand True, (Shift And constSftBoxCtrlMask) End If End Sub Private Sub SftBox1_ItemClick(ByVal Part As SftBoxLib50.SftBoxPortionConstants, ByVal AreaType As SftBoxLib50.SftBoxAreaConstants, ByVal ItemIndex As Long, ByVal ColNum As Integer, ByVal Button As Integer, ByVal Shift As Integer)
axSftBox1.Items.Selection = 0; CopyImageFromCurrentItem(); } private void ExpandCollapseItem(int ItemIndex, short Shift) { SftBoxItem Item = axSftBox1.get_Item(ItemIndex); if (Item.Expanded) Item.Collapse(true); else Item.Expand(true, ((Shift & (short)SftBoxKeyConstants.constSftBoxCtrlMask))!=0 ? true : false); } private void axSftBox1_ItemClick(object sender, AxSftBoxLib50._ISftBoxEvents_ItemClickEvent e) {
m_vBox->Header[1]->Image->Clear(); } } void CPicturesDlg::ExpandCollapseItem(long ItemIndex, short Shift) { ISftBoxItemPtr pItem; pItem = m_vBox->Item[ItemIndex]; if (pItem->Expanded != VARIANT_FALSE) pItem->Collapse(VARIANT_TRUE); else pItem->Expand(VARIANT_TRUE, (Shift & constSftBoxCtrlMask) ? VARIANT_TRUE : VARIANT_FALSE); } void CPicturesDlg::OnItemClickSftBox1(long Part, long AreaType, long ItemIndex, short ColNum, short Button, short Shift) {
See Also SftBoxItem Object | Object Hierarchy