ColWidth Property (ModHFGrid)

See Also    Example    Applies To

Returns or sets the width of the column in the specified band in logical twips. This property is not available at design time.

Syntax

object.ColWidth(index, number) [= value]

The ColWidth property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
index A Long value that specifies which column's width to change.
number Optional. A Long value that specifies the band that contains the column.
value A numeric expression that specifies the width of the specified column in twips.

Remarks

You can use this property to set the width of any column at run time. For instructions on setting column widths at design time, see the FormatString property.

You can set ColWidth to zero to create invisible columns, or to – 1 to reset the column width to its default value, which depends on the size of the current font.

When number is not specified, it defaults to zero. Hence, when the ModHFGrid is not bound to a hierarchical Recordset, using zero and not specifying number both have the same result.