A data column's attributes.

Usage

Set_Property(OLECtrlEntID, "OLE.DataColumn[col]", Array)

Values

Array has the following structure:

PosNameTypeDescriptionDefault
<1>WidthIntegerThe width, in pixels, of the column80
<2>VisibleBooleanEstablishes whether or not the column is visible to the user1
<3>ResizableBooleanEstablishes whether or not the user can resize the column at runtime1
<4>AutosizedBooleanEstablishes whether or not the column resizes itself to fit all columns as best as possible within the entire width of the edit table0
<5>Selected WidthIntegerThe width, in pixels, of the column when selected0

Indices

IndexDescription
colIndex to an existing data column

Remarks

The DataColumn allows you to modify column-specific attributes for data columns only. A data column is any column that is not made entirely of header cells. Note also that a column index is requested, not a field index since fields often span more than one column.

Width

The first field, Width, is how you can alter the width of a column. You can also just read this field if you wish to find the width of a column. This value changes if the user is allowed to resize the column during runtime.

Visible

The Visible field allows you to show or hide columns from the user. The columns still exist and have the same index locations, but the user has no indication that they exist.

Resizable

The third field, Resizable, establishes whether or not the user can click and drag the column's header to resize it. By default all columns are resizable. If you set a column to be autosized, then this field is ignored and the user cannot resize the column.

Autosized

The forth field, Autosized, lets you specify automatic resizing behavior for a column. The edit table resolves autosized columns thusly: if the total width of all columns is less then the table's width, then all autosized columns are equally sized in such as way that all columns fit perfectly within the table. If the total width of all columns is greater than the table's width, then all autosized columns revert to their preset Width values.

Selected Width

The Selected Width field allows you customize the width of the column when it becomes selected. A column is considered selected if any cell in that colum is the selected cell. Simply set this field to any value larger than the Width field. This size will be applied only when it will make the column larger. If the column is larger than this value, then it is ignored. This feature is useful if you need widen the cell the the user is working on, as if they were zoomin in.

Copy Images

The Copy Images field controls how images are handled when new cells are added to the column. By default, the new cell gets a copy of the image used in the cell before it. Set this to zero if you want all new cell's to have no image, regardless of the previous cell's image.

See Also

DataRowHeaderColumn

  • No labels