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
Enables sort indicators in column headers.
C
BOOL WINAPI SftTree_EnableSortIndicators(HWND hwndCtl, BOOL fOn, BOOL fAuto);
C++
BOOL CSftTree::EnableSortIndicators(BOOL fOn, BOOL fAuto); BOOL CSftTreeSplit::EnableSortIndicators(BOOL fOn, BOOL fAuto);
hwndCtl
The window handle of the tree control.
fOn
Set to TRUE to enable sort indicators, otherwise set to FALSE.
fAuto
Set to TRUE to let the tree control handle user interaction automatically for sort indicators, otherwise set to FALSE. If TRUE, the tree control will automatically set and reset sort indicators for all columns as the user clicks or double-clicks a column header to change the sort order.
The return value is TRUE if the function was successful, otherwise FALSE is returned.
If automatic sort indicator handling is enabled using fAuto, the tree control will set and reset sort indicators for all columns as the user clicks or double-clicks a column header to change the sort order. The tree control will not automatically sort the data.
The SFTTREEN_LBUTTONDOWN_COLUMN_HEADER notification can be used by the application to determine when the sort order was changed by the user. In response to this notification, GetSortColumn1 can be used to retrieve the new sort order and sort accordingly, typically using SortDependents.
In a tree control using a virtual data source, sorting has to be accomplished by adjusting the sort order of the virtual data source.
SftTree_SetShowTruncated(g_hwndTree, TRUE);/* Show ... if truncated */ SftTree_SetSelectionStyle(g_hwndTree, SFTTREE_SELECTION_CELL1);/* Select first cell only */ SftTree_SetSelectionArea(g_hwndTree, SFTTREE_SELECTIONAREA_ALLCELLS);/* Selection changes by clicking on an item's cells */ SftTree_SetFlyby(g_hwndTree, TRUE); /* Flyby highlighting */ SftTree_SetUpdateCaretExpandCollapse(g_hwndTree, FALSE);/* don't update caret location when expand/collapse button clicked */ SftTree_SetScrollTips(g_hwndTree, TRUE);/* Show Scrolltips */ SftTree_SetInheritBgColor(g_hwndTree, TRUE);/* Inherit background color of first cell */ SftTree_SetReorderColumns(g_hwndTree, TRUE);/* Column reordering */ SftTree_EnableSortIndicators(g_hwndTree, TRUE, TRUE);/* Automatic sort indicators - application must implement sorting */ SftTree_SetOpenEnded(g_hwndTree, TRUE);/* Last column width */ SftTree_SetShowHeaderButtons(g_hwndTree, TRUE);/* Show column header as buttons */ /* Define control attributes */ { SFTTREE_CONTROL CtrlInfo; memset(&CtrlInfo, 0, sizeof(SFTTREE_CONTROL));
m_Tree.SetShowTruncated(TRUE); /* Show ... if truncated */ m_Tree.SetSelectionStyle(SFTTREE_SELECTION_CELL1);/* Select first cell only */ m_Tree.SetSelectionArea(SFTTREE_SELECTIONAREA_ALLCELLS);/* Selection changes by clicking on an item's cells */ m_Tree.SetFlyby(TRUE); /* Flyby highlighting */ m_Tree.SetUpdateCaretExpandCollapse(FALSE);/* don't update caret location when expand/collapse button clicked */ m_Tree.SetScrollTips(TRUE); /* Show Scrolltips */ m_Tree.SetInheritBgColor(TRUE); /* Inherit background color of first cell */ m_Tree.SetReorderColumns(TRUE); /* Column reordering */ m_Tree.EnableSortIndicators(TRUE, TRUE);/* Automatic sort indicators - application must implement sorting */ m_Tree.SetOpenEnded(TRUE); /* Last column width */ m_Tree.SetShowHeaderButtons(TRUE); /* Show column header as buttons */ /* Define control attributes */ { SFTTREE_CONTROL CtrlInfo; memset(&CtrlInfo, 0, sizeof(SFTTREE_CONTROL));
See Also C/C++ API | Categories | Notifications