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 horizontal extent (in pixels) of the displayable area.
C
int WINAPI SftTree_GetHorizontalExtent(HWND hwndCtl); BOOL WINAPI SftTree_SetHorizontalExtent(HWND hwndCtl, int width); int WINAPI SftTreeSplit_GetHorizontalExtent(HWND hwndCtl, BOOL fLeft); BOOL WINAPI SftTreeSplit_SetHorizontalExtent(HWND hwndCtl, int width, BOOL fLeft);
C++
int CSftTree::GetHorizontalExtent() const; BOOL CSftTree::SetHorizontalExtent(int width); int CSftTreeSplit::GetHorizontalExtent(BOOL fLeft = FALSE) const; BOOL CSftTreeSplit::SetHorizontalExtent(int width, BOOL fLeft = FALSE);
hwndCtl
The window handle of the tree control.
width
The new width (in pixels) of the displayable area. If this parameter is greater than the window width, the tree control can be scrolled horizontally.
fLeft
Set to TRUE to return or set the horizontal extent of the left side of a split tree control (the portion of the tree control containing the hierarchy). If FALSE is specified, the horizontal extent of the right side is returned or set.
GetHorizontalExtent returns the width of the tree control's displayable area in pixels.
SetHorizontalExtent returns TRUE if the function was successful, otherwise FALSE is returned.
The GetHorizontalExtent and SetHorizontalExtents functions define the horizontal extent (in pixels) of the displayable area.
A tree control's displayable area can be wider than the tree control's window width. If the displayable area is wider, the tree control can be scrolled horizontally if it has a horizontal scroll bar (WS_HSCROLL window style). The width of the displayable area can be set by the application using SetHorizontalExtent or by calculating the optimal width using RecalcHorizontalExtent. For performance reasons, the optimal width is not automatically calculated when adding items to a tree control.
The width set using SetHorizontalExtent must be equal to or greater than the combined column widths, otherwise it will fail.
If the width returned is smaller than the actual window width, the control cannot be scrolled horizontally. The horizontal scroll bar will be disabled or hidden, based on the window style SFTTREESTYLE_DISABLENOSCROLL.
See Also C/C++ API | Categories | Notifications