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 maximum number of items to consider for optimal column width and scrolling calculation.
C
int WINAPI SftTree_GetCalcLimit(HWND hwndCtl); void WINAPI SftTree_SetCalcLimit(HWND hwndCtl, int limit); int WINAPI SftTreeSplit_GetCalcLimit(HWND hwndCtl); void WINAPI SftTreeSplit_SetCalcLimit(HWND hwndCtl, int limit);
C++
int CSftTree::GetCalcLimit() const; void CSftTree::SetCalcLimit(int limit = 0); int CSftTreeSplit::GetCalcLimit() const; void CSftTreeSplit::SetCalcLimit(int limit = 0);
hwndCtl
The window handle of the tree control.
limit
Defines the maximum number of items to be considered for width calculation. Specify a number less than or equal to 0 to consider all items. If a tree control contains many items, scanning all items may be extremely slow, as each row header or cell width needs to be calculated. Using an application defined maximum number, the calculation can be limited to limit items. This results in better response time, yet some items which are not within the number of scanned items may still be clipped.
GetCalcLimit returns the maximum number of items to be considered for optimal column width and scrolling calculation.
The GetCalcLimit and SetCalcLimit functions define the maximum number of items to consider for optimal column width and scrolling calculation.
This function is used to define the maximum number of items to be considered when using SftTree_CalcOptimalColumnWidth, SftTree_CalcOptimalRowHeaderWidth, SftTree_MakeColumnOptimal, SftTree_MakeRowHeaderOptimal and SftTree_RecalcHorizontalExtent. The C implementation of these functions does not support the limit parameter. SetCalcLimit is not normally used with C++ as the equivalent C++ functions support limit as a parameter.
{ SFTTREE_COLORS Colors; SftTreeSplit_GetCtlColors(g_hwndTree, &Colors);/* Get current color settings */ Colors.colorSelBgNoFocus = COLOR_BTNFACE | 0x80000000L;/* Selection background color (no input focus) */ Colors.colorSelFgNoFocus = COLOR_BTNTEXT | 0x80000000L;/* Selection foreground color (no input focus) */ SftTreeSplit_SetCtlColors(g_hwndTree, &Colors);/* Set new colors */ } // In our example, we use SetCalcLimit(50) which will only consider 50 items when // MakeColumnOptimal, MakeRowHeaderOptimal or MakeSplitterOptimal is used. Because our sample // data is wider at the end of the list, we'll change the TopIndex to the very last few items. // That way the last 50 items are analyzed. In a typical application this is not necessary. SftTreeSplit_SetTopIndex(g_hwndTree, SftTreeSplit_GetCount(g_hwndTree) - 50); /* Make all column widths optimal, so text and pictures */
See Also C/C++ API | Categories | Notifications