I have a customer that need to select records in the browser like MS standard, that means:
CTRL+left mouse = mark single record
SHIFT+left mouse = mark from previous selected record to actual record
For now I use itemmarked and an array of the last marked records, I shift the last marked record, that works so far. But how can I check in the itemmarked codeblock which key is actually pressed ? I need to check if CTRL or Shift is pressed when the record is marked.
Or is there a easier way in a browse handler function ?
regards
Rudolf
Code: Select all
aRecord := {0,0}
...
ITEMMARKED {||_dbfeditmark(oBrowse,getlist,@aRecord)}
static function _dbfeditmark(oBrowse,getlist,aRecord)
******************************************************************
if db->(recno()) # aRecord[1]
aRecord[2] := aRecord[1]
aRecord[1] := db->(recno())
endif
dcqdebug aRecord
return .t.