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 the method used to search for matching items in response to characters typed by the user.
C
int WINAPI SftTree_GetCharSearchMode(HWND hwndCtl); void WINAPI SftTree_SetCharSearchMode(HWND hwndCtl, int mode, int realCol); int WINAPI SftTreeSplit_GetCharSearchMode(HWND hwndCtl); void WINAPI SftTreeSplit_SetCharSearchMode(HWND hwndCtl, int mode, int realCol);
C++
int CSftTree::GetCharSearchMode() const; void CSftTree::SetCharSearchMode(int mode = SFTTREE_CHARSEARCH_ONECHAR, int realCol = -1); int CSftTreeSplit::GetCharSearchMode() const; void CSftTreeSplit::SetCharSearchMode(int mode = SFTTREE_CHARSEARCH_ONECHAR, int realCol = -1);
hwndCtl
The window handle of the tree control.
mode
Defines the method used to search for matching items in response to characters typed by the user. mode can be one of the following values:
SFTTREE_CHARSEARCH_ONECHAR | Starting at the current item, the next item starting with the one single character typed is located and made current. |
SFTTREE_CHARSEARCH_ALLCHARS | The first item in the tree control that matches the character(s) typed within a short time period is located and made current. As the user types additional characters, the search continues. If the user pauses for more than the time interval defined using SFTTREE_CONTROL, nCharSearchMaxInterval (default one second), the search ends. The next character typed starts a new search. |
SFTTREE_CHARSEARCH_NONE | Characters typed are ignored. |
SFTTREE_CHARSEARCH_ALLCHARS2 | Same as SFTTREE_CHARSEARCH_ALLCHARS, but dependent items of a collapsed parent item are not searched. |
SFTTREE_CHARSEARCH_ONECHAR2 | Same as SFTTREE_CHARSEARCH_ONECHAR, but dependent items of a collapsed parent item are not searched. |
SFTTREE_CHARSEARCH_ONECHARWRAP | Starting at the current item, the next item starting with the one single character typed is located and made current. If the end of the list of items is reached, the search wraps around and starts at the beginning of the list. |
SFTTREE_CHARSEARCH_ONECHARWRAP2 | Same as SFTTREE_CHARSEARCH_ONECHARWRAP, but dependent items of a collapsed parent item are not searched. |
SFTTREE_CHARSEARCH_ALLCHARSWRAP | The next item in the tree control that matches the character(s) typed within a short time period is located and made current. As the user types additional characters, the search continues. If the user pauses for more than the time interval defined using SFTTREE_CONTROL, nCharSearchMaxInterval (default one second), the search ends. The next character typed starts a new search. |
SFTTREE_CHARSEARCH_ALLCHARSWRAP2 | Same as SFTTREE_CHARSEARCH_ALLCHARSWRAP, but dependent items of a collapsed parent item are not searched. |
realCol
The zero-based column number to be searched. If -1 is specified, the first displayed column is searched.
GetCharSearchMode returns a value indicating the current search method used.
The GetCharSearchMode and SetCharSearchMode functions define the method used to search for matching items in response to characters typed by the user.
// SftTree_SetRowInfo(g_hwndTree, &RowInfo); } SftTree_SetRowColHeaderText(g_hwndTree, TEXT(""));/* Row/column header text */ SftTree_SetRowColHeaderStyle(g_hwndTree, ES_LEFT | SFTTREE_HEADER_UP);/* Row/column header style */ Sft_InitPicture(&Pic); Sft_SetPictureSizeOnly(&Pic, PIC_SIZEX, PIC_SIZEY);/* Row/column header picture */ SftTree_SetRowColHeaderPicture(g_hwndTree, &Pic);/* Row/column picture */ SftTree_SetRowColHeaderPictureStyle(g_hwndTree, SFTTREE_BMP_RIGHT);/* Row/column picture alignment */ SftTree_SetCharSearchMode(g_hwndTree, SFTTREE_CHARSEARCH_ALLCHARS, -1);/* Consider all characters typed */ /* Change the default colors */ { SFTTREE_COLORS Colors; SftTree_GetCtlColors(g_hwndTree, &Colors);/* Get current color settings */ Colors.colorTreeLines = COLOR_3DDKSHADOW | 0x80000000L;/* Tree line color */ Colors.colorSelBgNoFocus = COLOR_BTNFACE | 0x80000000L;/* Selection background color (no input focus) */ Colors.colorSelFgNoFocus = COLOR_BTNTEXT | 0x80000000L;/* Selection foreground color (no input focus) */
// m_Tree.SetRowInfo(&RowInfo); } m_Tree.SetRowColHeaderText(_T("?")); /* Row/column header text */ m_Tree.SetRowColHeaderStyle(ES_LEFT | SFTTREE_HEADER_UP);/* Row/column header style */ Sft_InitPicture(&Pic); /* Initialize */ Sft_SetPictureSizeOnly(&Pic, PIC_SIZEX, PIC_SIZEY);/* Row/column header picture */ m_Tree.SetRowColHeaderPicture(&Pic); /* Row/column picture */ m_Tree.SetRowColHeaderPictureStyle(SFTTREE_BMP_RIGHT);/* Row/column picture alignment */ m_Tree.SetCharSearchMode(SFTTREE_CHARSEARCH_ALLCHARS, -1);/* Consider all characters typed */ /* Change the default colors */ { SFTTREE_COLORS Colors; m_Tree.GetCtlColors(&Colors); /* Get current color settings */ Colors.colorTreeLines = COLOR_3DDKSHADOW | 0x80000000L;/* Tree line color */ Colors.colorSelBgNoFocus = COLOR_BTNFACE | 0x80000000L;/* Selection background color (no input focus) */ Colors.colorSelFgNoFocus = COLOR_BTNTEXT | 0x80000000L;/* Selection foreground color (no input focus) */
See Also C/C++ API | Categories | Notifications