一般:
在dw_1的事件event
的clicked()
if row> 0 then this.scrolltorow(row)
在rowfocuschanged()
if currentrow>0 then
this.selectrow(0,false)
this.selectrow(currentrow,true)
end if
This statement selects the fifteenth row in dw_employee:
PowerBuilder
dw_employee.SelectRow(15, TRUE)
Java
dw_employee.selectRow(15, true);
As the script for a DataWindow's Clicked event, this example removes highlighting from all rows and then highlights the row the user clicked.
PowerBuilder Row is an argument passed to the event script:
This.SelectRow(0, FALSE)
This.SelectRow(row, TRUE)
Java The row number is passed in the MouseEvent object: