long il_lastclickedrow
Clicked Event Of The Standard Datawindow UO
/* Row is an argument to the clicked! event and contains the row
number clicked. If row = 0, then the user did not click on a row */
IF row = 0 THEN Return
IF KeyDown ( KeyShift! ) THEN
/* This event is described later in this document */
this.Event ue_rowhighlight ( row )
ELSEIF KeyDown ( KeyControl! ) THEN
IF this.GetSelectedRow ( row - 1 ) = row THEN
this.SelectRow ( row, FALSE )
ELSE
this.SelectRow ( row, TRUE )
END IF
ELSE
this.SelectRow ( 0, FALSE )
this.SelectRow ( row, TRUE )
END IF
// Save the row clicked in the instance variable for use in
ue_rowhighlight
il_lastclickedrow = row
CUSTOM EVENT "ue_rowhighlight" ON THE STANDARD DATAWINDOW USER OBJECT.
Event has no event ID mapping and takes the following argument:
name = al_row, datatype = long, passed by value Event returns [None]
This function will verify that there is a prior selected row and then
highlight all Rows between the two. If there is no previously Selected
row, then it will highlight only the row clicked. This function will
not unhighlight any other rows to allow for a mix of shift and Control
keys. This code is aware of the relation between the rows and
highlights the rows in the appropriate direction.
The argument passed will be the last row clicked. This function will
use the existing DataWindow and the instance variable
il_lastclickedrow to perform its scrolling:
integer li_i
this.SetReDraw ( FALSE )
IF il_lastclickedrow = 0 THEN
this.SelectRow ( al_row, TRUE )
Return
END IF
IF il_lastclickedrow > al_row THEN
FOR li_i = il_lastclickedrow to al_row STEP -1
this.SelectRow ( li_i, TRUE )
NEXT
ELSE
FOR li_i = il_lastclickedrow to al_row
this.SelectRow ( li_i, TRUE )
NEXT
END IF
this.SetReDraw ( TRUE )