I'm trying to use right mouse click over the titles/headers, in a tbrowse.
The thing is detecting programatically, based on the data tbrowse object has, where the user clicks the mouse.
I used this to detect the mouse click (includes keyboard press):
nkey := inkey(0.1, INKEY_ALL-INKEY_MOVE)
Case nKey = K_RBUTTONUP // right button over tbrowse area (object B)
wRowX := mrow()
wColY := mcol()
case rango(wRowX, b:ntop+1, b:nbottom) .and. ;
rango(wColY, b:nleft, b:nright)
// do something while in data area
case rango(wRowX, maxrow()-1, maxrow())
// if at bottom 2 lines, show the meaning of f-keys F1 to F12
// this is the problematic one:
case b:mrowpos < 0 .and. rango(wColY, b:nleft, b:nright)
// header area -- fails if the click is outside of the tbrowse area
alert('I'm in the header zone ',,,3)
The thing is how to recognize programatically (using the information provided in the tbrowse object, b), that the right mouse click was fired in the column headers area.
I couldn't do it in a safe way, because b:mrowpos behaves erratically, specially when I click outside of the tbrowse area.
If anyone has a clue, it is welcome.
Buenos Aires - Argentina