|
|
|
ItemExpandCollapseButton |
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);
Parameters
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.
Returns
GetItemExpandCollapseButton returns TRUE if the item's expand/collapse button is shown, FALSE if the item's expand/collapse button is hidden.
Comments
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