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
Expands the item so its dependents become visible.
VB.NET | object.Expand(ByVal Preserve As Boolean, ByVal Depth As Boolean) |
VB | object.Expand(ByVal Preserve As Boolean, ByVal Depth As Boolean) |
C#.NET | void object.Expand(bool Preserve, bool Depth); |
VC++ | HRESULT object->Expand(VARIANT_BOOL Preserve, VARIANT_BOOL Depth); |
C | HRESULT object->raw_Expand(VARIANT_BOOL Preserve, VARIANT_BOOL Depth); |
object
Preserve
Defines whether the expand/collapse state is restored. This argument is ignored if the Depth argument is True.
Preserve | Description |
---|---|
True | Restores the expand/collapse state of dependent items made visible, as saved by a previous call to Items.Collapse or Item.Collapse. |
False | The expand/collapse state is not restored. Only the item itself is expanded and immediate dependents are made visible. They may be expanded or collapsed based on the Depth argument. |
Depth
Defines the depth of the items to become visible.
Depth | Description |
---|---|
True | Expands all dependent items, including non-immediate dependent items. Preserve is ignored as all dependents are expanded. |
False | Expands dependent items, based on the Preserve settings. |
The Expand method expands the item so its dependents become visible.
The Expand method expands all dependent items of the item and restores the expand/collapse state of all dependent items, as saved by a previous Items.Collapse or Item.Collapse method call.
If the item is already expanded when using Expand, the item remains unchanged. It does not make any indirect dependents visible. To make sure that an item's indirect dependents are shown, use the Item.Collapse method first, which collapses the item (and all dependents), followed by Expand. Now all dependents are visible.
The drop down portion is automatically hidden when the combo box contents are changed using this method. The DropDown.SuppressOn method can be used to suppress hiding the drop down portion when adding/inserting items.
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 Select Case e.areaType Case SftBoxAreaConstants.areaSftBoxColumn If e.colNum = 0 Then
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) Select Case AreaType Case areaSftBoxColumn If ColNum = 0 Then
} 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) { switch (e.areaType) { case SftBoxAreaConstants.areaSftBoxColumn: if (e.colNum == 0)
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) { switch (AreaType) { case areaSftBoxColumn: if (ColNum == 0) SetSortDirection(!m_fSortDirection);
See Also SftBoxItem Object | Object Hierarchy