Programmatically moves a column to a new position.

Syntax

rv = Send_Message(Ctrl, "OLE.MoveColumn", Column, NewPosition)

Parameters

ParameterDescription
ColumnThe column you wish to move
NewPositionThe column's new position

Remarks

The MoveColumn method programmatically moves a column into a new position, just as if the user had drag and dropped the column into that position. The Column parameter is an index to a column as appears in the ColumnList property. The NewPosition property is the column's new position.

For example, you can move column five to the front by setting Column to 5 and NewPosition to 1. It does not matter whether or not the user had previously moved column five to some other position, column five is always column five, even if it is in position one.

Example

// Move column 5 to position 1 
Send_Message(@Window:".OLE_REPORTTABLE", "OLE.MoveColumn", 5, 1)

See Also

ColumnList

  • No labels