|
|
|
SftTreeColumn.WidthPix Property |
Defines the width of this column.
Syntax
VB.NET |
WPix = object.WidthPix As Integer |
||
VB |
WPix = object.WidthPix As Long |
||
C#.NET |
int WPix = object.WidthPix; |
||
VC++ |
long WPix = object->WidthPix;
|
||
C |
HRESULT object->get_WidthPix(long* WPix); |
||
Delphi |
WPix := object.WidthPix : Integer; |
||
VB.NET |
object.WidthPix = WPix As Integer |
||
VB |
object.WidthPix = WPix As Long |
||
C#.NET |
int object.WidthPix = WPix; |
||
VC++ |
long object->WidthPix = WPix;
|
||
C |
HRESULT object->put_WidthPix(long WPix); |
||
Delphi |
object.WidthPix := WPix : Integer; |
object
A SftTreeColumn object.
WPix
Defines the width of this column in pixels.
Comments
The WidthPix property defines the width of this column.
The Column.Width and Column.WidthPix properties are synonyms, but may use different coordinate systems.
The column width must be greater or equal to the column's minimum width. The minimum width can be defined using the Column.MinWidth property.
The last column in a tree control may be defined as an open-ended column (see ColumnsObj.OpenEnded). An open-ended column cannot be resized, because an open-ended column doesn't have a defined width. An open-ended column will always use the space remaining between the previous column and the right edge of the tree control window.
Due to the variable number of levels and the resulting hierarchical display, the width of the first column is always treated as a minimum width. The text portion of the first column will always be at least of the specified width, no matter what level the item is on. This can result in the first column being much wider than the defined width. To calculate the actual width of column 0, add the value returned by the ColumnsObj.OverheadWidth property to the value returned by Column(0).WidthPix.
When changing column widths, the Items.RecalcHorizontalExtent method may have to be used to recalculate the optimal horizontal scrolling extent.
The Column.OptimalWidth or Column.MakeOptimal methods can be used to calculate or define the optimal width for a column. An optimal width allows all text and graphic components in a column to be displayed in their entirety, without being clipped.
See Also SftTreeColumn Object | Object Hierarchy