C
Col, Row Properties
ColWordWrapOption Properties
Expand Minimize
1 out of 1 rated this helpful - Rate this topic

Visual Basic: MSFlexGrid/MSHFlexGrid Controls

Visual Studio 6.0

ColPosition, RowPosition Properties

See Also    Example    Applies To

  • ColPosition Sets the position of an MSHFlexGrid column, allowing you to move columns to specific positions.

  • RowPosition Sets the position of an MSHFlexGrid row, allowing you to move rows to specific positions.

Syntax

object.ColPosition(index, number) [= value]
object.RowPosition(number) [= value]

Note   The above ColPosition syntax cannot be used in an MSFlexGrid due to the limitations of this control. If you are using MSFlexGrid, use the syntax: object.ColPosition(number) [= value]

Syntax for the ColPosition and RowPosition properties 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 the column to be moved.

Note   This is not applicable to the MSFlexGrid.

number A Long value that specifies the band containing the column to be moved. Optional.

Note   In the MSFlexGrid, this is the number of the column or row to be moved.

value Integer. A numeric expression that specifies the new position of the column or row.

Remarks

In the MSHFlexGrid, when BandNumber is not specified, it defaults to 0. Hence, when the grid is not bound to a hierarchical Recordset, using 0 for BandNumber and not specifying BandNumber both have the same result. Note that BandNumber is an optional parameter for backward compatibility with the MSFlexGrid.

The index and setting must correspond to valid row or column numbers (in the range 0 to Rows 1 or Cols 1), otherwise an error is generated.

When a row or column is moved using the RowPosition and ColPosition properties, all formatting information moves with it. This includes width, height, alignment, colors, and font properties. To move text only, use the Clip property.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.