Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

ColumnStyle Property, SftTree Object

Defines the cell style in the specified column.

Deprecated - Provided for compatibility with earlier versions only - Use Column.CellHAlign, Column.CellVAlign, Column.CellMultiline, Column.ToolTip, Column.CellWordWrap, Header.Locked, Header.KeepPosition, Column.Merge, Column.MergeInto instead

Syntax

Get

VB.NETStyle = object.get_ColumnStyle(ByVal ColIndex As Short) As SftTreeColumnStyleConstants
VBStyle = object.ColumnStyle(ByVal ColIndex As Integer) As SftTreeColumnStyleConstants
C#.NETSftTreeColumnStyleConstants Style = object.get_ColumnStyle(short ColIndex);
VC++enum SftTreeColumnStyleConstants Style = object->ColumnStyle[short ColIndex];
enum SftTreeColumnStyleConstants Style = object->GetColumnStyle(short ColIndex);
CHRESULT object->get_ColumnStyle(short ColIndex, enum SftTreeColumnStyleConstants* Style);

Put

VB.NETobject.set_ColumnStyle(ByVal ColIndex As Short, ByVal Style As SftTreeColumnStyleConstants)
VBobject.ColumnStyle(ByVal ColIndex As Integer) = Style As SftTreeColumnStyleConstants
C#.NETvoid object.set_ColumnStyle(short ColIndex, SftTreeColumnStyleConstants Style);
VC++enum SftTreeColumnStyleConstants object->ColumnStyle[short ColIndex] = Style;
void object->PutColumnStyle(short ColIndex, enum SftTreeColumnStyleConstants Style);
CHRESULT object->put_ColumnStyle(short ColIndex, enum SftTreeColumnStyleConstants Style);

object

A SftTree object.

ColIndex

The zero-based column number.

Style

Defines the cell style in the specified column.

One value of each of the following tables can be combined and used as Style value (use Column.CellHAlign, Column.CellVAlign instead):

Horizontal AlignmentValueDescription
colstyleSftTreeLeft0The text and graphic component are left aligned.
colstyleSftTreeCenter1The text and graphic component are centered.
colstyleSftTreeRight2The text and graphic component are right aligned.
Vertical AlignmentValueDescription
colstyleSftTreeVCenter0x1000 (4096)The text is vertically centered. If no vertical alignment value is specified, this is the default.
colstyleSftTreeTop0x2000 (8192)The text is aligned with the top of the available area.
colstyleSftTreeBottom0x4000 (16384)The text is aligned with the bottom of the available area.

The values in the above table can be combined with the following values using a bit-wise Or operator.

StyleValueDescription
colstyleSftTreeMultiline0x0004 (4)Cell text may contain CR/LF (carriage-return, line-feed) characters which signal the start of a new line. If multi-line text is allowed, the Items.Lines property can be used to reserve sufficient space. Use Column.CellMultiline instead.
colstyleSftTreeToolTip0x0008 (8)Displays Tool Tips for the column if the cell text and/or graphic component are clipped. Also see the Items.ToolTipAlways property. Use Column.ToolTip instead.
colstyleSftTreeWrap0x0010 (16)Cell text may word-wrap within the available space. The Items.Lines property should be used to define the (maximum) number of text lines allowed. Word-wrap is only available if colstyleSftTreeMultiline is also used. If colstyleSftTreeMultiline is not given, colstyleSftTreeWrap is ignored. Use Column.CellWordWrap instead.
colstyleSftTreeLocked0x0100 256The column width is locked and the user cannot resize the column. This can be used to hide certain columns. By setting a column's width to 0 and locking it, a user cannot make the column visible. Use Header.Locked instead.
colstyleSftTreeKeepPos0x0200 (512)The column must remain in the current column position. Columns on the left can be reordered but cannot be moved to the right of the column and vice versa. This is usually used with the first column, to prevent the user from changing its position when using column drag & drop. Use Header.KeepPosition instead.
colstyleSftTreeMerge0x0400 (1024)Allows the contents of this column to merge into the next displayed column if the contents of the next cell (or column header) are empty and the next column allows being merged into (colstyleSftTreeMergeInto). This style also applies to column headers. Use Column.Merge instead.
colstyleSftTreeMergeInto0x0800 (2048)Allows the contents of the previous column to merge into this column if the cell (or column header) in this column is empty. This style also applies to column headers. Use Column.MergeInto instead.

Comments

Deprecated - Provided for compatibility with earlier versions only - Use Column.CellHAlign, Column.CellVAlign, Column.CellMultiline, Column.ToolTip, Column.CellWordWrap, Header.Locked, Header.KeepPosition, Column.Merge, Column.MergeInto instead

The ColumnStyle property defines the cell style in the specified column.

The Style value defined using the ColumnStyle property applies to all cells in the column specified. Individual cells can override the defined default alignment using the Cell.TextHAlign, Cell.TextVAlign, Cell.ImageHAlign and Cell.ImageVAlign properties.

To define the column header's text alignment, use the Header.TextHAlign and Header.TextVAlign properties instead.

See Also SftTree Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.