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 is expandable.
C
BOOL WINAPI SftTree_GetItemExpandable(HWND hwndCtl, int index); BOOL WINAPI SftTree_SetItemExpandable(HWND hwndCtl, int index, BOOL fExpandable); BOOL WINAPI SftTreeSplit_GetItemExpandable(HWND hwndCtl, int index); BOOL WINAPI SftTreeSplit_SetItemExpandable(HWND hwndCtl, int index, BOOL fExpandable);
C++
BOOL CSftTree::GetItemExpandable(int index) const; BOOL CSftTree::SetItemExpandable(int index, BOOL fExpandable = TRUE); BOOL CSftTreeSplit::GetItemExpandable(int index) const; BOOL CSftTreeSplit::SetItemExpandable(int index, BOOL fExpandable = TRUE);
hwndCtl
The window handle of the tree control.
index
The zero-based index of the item for which the expandable status is to be retrieved or set.
fExpandable
Set to TRUE to make the item an expandable item or FALSE to collapse the item and delete all dependents.
GetItemExpandable returns TRUE if the item is expandable, FALSE if the item doesn't have any dependents.
SetItemExpandable returns TRUE if the function was successful, otherwise FALSE is returned.
The GetItemExpandable and SetItemExpandable functions define whether an item is expandable.
Normally, only a parent item (with dependents) is expandable. Instead of adding dependent items, an item can be made a parent item using the SetItemExpandable function. An expandable item displays an expand/collapse button and displays a suitable item picture.
A leaf item can be made a "temporary" parent item by using SetItemExpandable(TRUE). The item now displays an expand/collapse button and other attributes, such as the item picture, even though no dependents are present. The item can be expanded by the application in response to a SFTTREEN_-style notification. The application can then add child items as the user expands this "temporary" parent item, making it into a real parent item.
When using SetItemExpandable, dependents are always removed unless the item is already expanded.
When using SetItemExpandable(FALSE), the item is collapsed (and its dependents are removed).
When using SetItemExpandable(TRUE) and the item is already expanded and has dependents, the item remains unchanged.
An item's expand/collapse button can be hidden using the SetItemExpandCollapseButton function.
In a tree control using a virtual data source, SetItemExpandable cannot be used and an error is returned.
See Also C/C++ API | Categories | Notifications