Programmatically navigates the table.
Syntax
rv = Send_Message(Ctrl, "OLE.MoveTo", Direction, SelectBlock, IgnoreSelection, Row)
Parameters
Parameter | Description |
---|---|
Direction | The direction to navigate |
SelectBlock | Determines if selection should be extended to new location |
IgnoreSelection | Determines if selection is left unchanged |
Row | When Direction is "Row," the index of the new row location |
Remarks
The MoveTo method allows you to simulate keyboard navigation programmatically. The Direction parameter determines how the navigation is to take place. The following values may be used:
Value | Description |
---|---|
Down | Moves down one row |
FirstRow | Move to the first row |
LastRow | Moves to the last row |
Left | Moves to the left one column |
PageUp | Moves up one page |
PageDown | Moves down one page |
Right | Moves to the right one column |
Row | Moves directly to a given row |
Up | Moves up one row |
The SelectBlock and IgnoreSelection parameters control changes in selection. If both are set to zero, then the selection is moved to the new location. For example, moving in the "Up" direction replaces the entire selection (no matter how complex) with that one row. Setting SelectBlock to true is the equivalent of holding Shift while selecting. It creates a new selection from the previous selection to the new location. Setting IgnoreSelection to true forces the selection to not change at all.
The Row parameter is only used when Direction is "Row." It takes the index of the row to which you wish to navigate.
Remember, OI is picky about OLE method parameters. Usually, you'll only use the Direction parameter, but unlike BASIC+ methods, you are not allowed to omit parameters. Always pass values to all four parameters, even if they are not used.
Example
// Navigate up one row Send_Message(@Window:".OLE_REPORTTABLE", "OLE.MoveTo", "Up", 0, 0, 0) // Navigate to row 1, then navigate to row 10, extending the selection Send_Message(@Window:".OLE_REPORTTABLE", "OLE.MoveTo", "FirstRow", 0, 0, 0) Send_Message(@Window:".OLE_REPORTTABLE", "OLE.MoveTo", "Row", 1, 0, 10)