Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

HorizontalExtent Property, SftTree Class

Defines the current horizontal scrolling extent in the left pane (or the only pane).

Class: SftTree
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public int HorizontalExtent { get; set; }
Public Property HorizontalExtent As Integer

Value

Defines the current horizontal scrolling extent. If this value is 0 (or less than the width of the left pane), horizontal scrolling is disabled.

The default value is 0.

Comments

Defines the current horizontal scrolling extent in the left pane (or the only pane).

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 (SftTree.ScrollbarHorizontal property). The width of the displayable area can be set by the application using the SftTree.RecalcHorizontalExtent method or the SftTree.HorizontalExtent property. For performance reasons, the optimal width is not automatically calculated when adding items to a tree control.

The SftTree.HorizontalExtent property defines the horizontal extent of the displayable area (or the left pane of a split tree control).

The SftTree.HorizontalExtentRight property defines the horizontal extent of the displayable area in the right pane of a split tree control. The SftTree.HorizontalExtentRight property can only be used with a split tree control.

If the defined horizontal extent 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 SftTree.ScrollbarHorizontal property.

By default, a tree control does not handle horizontal scrolling, even if the SftTree.ScrollbarHorizontal property defines scroll bars to be available. To start horizontal scrolling, an application has to use the ColumnClass.MakeOptimal and SftTree.RecalcHorizontalExtent methods or the SftTree.HorizontalExtent property. They indicate to the tree control that horizontal scrolling support is desired and allows it to determine the horizontal scrolling extent.

See Also SftTree Class | Classes | SftTree/NET 2.0