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 an item's visibility status.
C
BOOL WINAPI SftTree_GetItemShown(HWND hwndCtl, int index); BOOL WINAPI SftTree_SetItemShown(HWND hwndCtl, int index, BOOL fShown); BOOL WINAPI SftTreeSplit_GetItemShown(HWND hwndCtl, int index); BOOL WINAPI SftTreeSplit_SetItemShown(HWND hwndCtl, int index, BOOL fShown);
C++
BOOL CSftTree::GetItemShown(int index) const; BOOL CSftTree::SetItemShown(int index, BOOL fShown = TRUE); BOOL CSftTreeSplit::GetItemShown(int index) const; BOOL CSftTreeSplit::SetItemShown(int index, BOOL fShown = TRUE);
hwndCtl
The window handle of the tree control.
index
The zero-based index of the item for which the visibility status is to be retrieved or set.
fShown
Set to TRUE to make the item visible. An item is made visible by expanding all its parent items. Set to FALSE to hide the item. An item is hidden by collapsing its immediate parent item.
GetItemShown returns a value indicating the current visibility status of the specified item, TRUE if the item is visible (the parent item is expanded), FALSE if the item is not visible (the parent item is collapsed).
SetItemShown returns TRUE if the function was successful, otherwise FALSE is returned.
The GetItemShown and SetItemShown functions define an item's visibility status.
An item's visibility status can be retrieved using GetItemShown. Even if an item is considered "visible", it may not actually be shown, because it doesn't fall inside the area of items currently shown in the tree control's client area. Use MakeRowVisible to make the item visible to the user.
Items without parent items cannot be hidden. They always remain visible.
GetNextShown and GetPrevShown can be used to retrieve the next or previous visible item.
In a tree control using a virtual data source, SetItemShown cannot be used and an error is returned.
if (index < 0) index = lastShown; if (index > lastShown) index = 0; col = SftTree_GetRealColumn(g_hwndTree, dispCol); // make sure the item is shown if (SftTree_GetItemShown(g_hwndTree, index)) { // make sure the column is really displayed if (lpCol[col].width > 0) { // back at m_editIndex, m_editCol? if (m_editIndex == index && m_editCol == col) { StartEdit(index, col); return;
if (index < 0) index = lastShown; if (index > lastShown) index = 0; col = m_Tree.GetRealColumn(dispCol); // make sure the item is shown if (m_Tree.GetItemShown(index)) { // make sure the column is really displayed if (lpCol[col].width > 0) { // back at m_editIndex, m_editCol? if (m_editIndex == index && m_editCol == col) { StartEdit(index, col); return;
See Also C/C++ API | Categories | Notifications