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 width of the specified column.
Deprecated - Provided for compatibility with earlier versions only - Use Column.Width instead
Get
VB.NET | Width = object.get_ColumnWidth(ByVal ColIndex As Short) As Single |
VB | Width = object.ColumnWidth(ByVal ColIndex As Integer) As Single |
C#.NET | float Width = object.get_ColumnWidth(short ColIndex); |
VC++ | float Width = object->ColumnWidth[short ColIndex]; float Width = object->GetColumnWidth(short ColIndex); |
C | HRESULT object->get_ColumnWidth(short ColIndex, float* Width); |
Put
VB.NET | object.set_ColumnWidth(ByVal ColIndex As Short, ByVal Width As Single) |
VB | object.ColumnWidth(ByVal ColIndex As Integer) = Width As Single |
C#.NET | void object.set_ColumnWidth(short ColIndex, float Width); |
VC++ | float object->ColumnWidth[short ColIndex] = Width; void object->PutColumnWidth(short ColIndex, float Width); |
C | HRESULT object->put_ColumnWidth(short ColIndex, float Width); |
object
ColIndex
The zero-based column number.
Width
Defines the width of the specified column. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.
Deprecated - Provided for compatibility with earlier versions only - Use Column.Width instead
The ColumnWidth property defines the width of the specified column.
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 ColumnWidth(0).
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 SftTree Object | Object Hierarchy