Programmatically navigates the table.

Syntax

rv = Send_Message(Ctrl, "OLE.MoveTo", Direction, SelectBlock, IgnoreSelection, Row)

Parameters

ParameterDescription
DirectionThe direction to navigate
SelectBlockDetermines if selection should be extended to new location
IgnoreSelectionDetermines if selection is left unchanged
RowWhen 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:

ValueDescription
DownMoves down one row
FirstRowMove to the first row
LastRowMoves to the last row
LeftMoves to the left one column
PageUpMoves up one page
PageDownMoves down one page
RightMoves to the right one column
RowMoves directly to a given row
UpMoves 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)
  • No labels