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 an item's expand/collapse button is shown.
C
BOOL WINAPI SftTree_GetItemExpandCollapseButton(HWND hwndCtl, int index); BOOL WINAPI SftTree_SetItemExpandCollapseButton(HWND hwndCtl, int index, BOOL fShown); BOOL WINAPI SftTreeSplit_GetItemExpandCollapseButton(HWND hwndCtl, int index); BOOL WINAPI SftTreeSplit_SetItemExpandCollapseButton(HWND hwndCtl, int index, BOOL fShown);
C++
BOOL CSftTree::GetItemExpandCollapseButton(int index) const; BOOL CSftTree::SetItemExpandCollapseButton(int index, BOOL fShown = TRUE); BOOL CSftTreeSplit::GetItemExpandCollapseButton(int index) const; BOOL CSftTreeSplit::SetItemExpandCollapseButton(int index, BOOL fShown = TRUE);
hwndCtl
The window handle of the tree control.
index
The zero-based index of the item for which the expand/collapse button is to be shown or hidden.
fShown
Set to TRUE to show the item's expand/collapse button or FALSE to hide the item's expand/collapse button.
GetItemExpandCollapseButton returns TRUE if the item's expand/collapse button is shown, FALSE if the item's expand/collapse button is hidden.
The GetItemExpandCollapseButton and SetItemExpandCollapseButton functions define whether an item's expand/collapse button is shown.
SetItemExpandCollapseButton can only be used to show/hide an expand/collapse button for an item that has an expand/collapse button. Leaf items do not have an expand/collapse button, so it is not possible for SetItemExpandCollapseButton to be used to show an expand/collapse button. The SetItemExpandable function can be used instead to mark an item as expandable, so it receives an expand/collapse button. An item marked as expandable can have its expand/collapse button suppressed using the SetItemExpandCollapseButton function.
In a tree control using a virtual data source, SetItemExpandCollapseButton cannot be used and an error is returned. The flag2 member of the SFTTREE_ITEM structure is used instead.
See Also C/C++ API | Categories | Notifications