D.Cook
Member
If you've noticed this before, the code below might be of interest to you. When you right-click on a browse row that is not selected, it is not selected before displaying the context menu. This isn't what I would normally expect. After all, you would expect a context menu to have the correct context!
The following code snippet will select the row that you right-clicked on, before displaying the context menu. It assumes a column-label height of 17 pixels.. if you've got a suggestion for improving this please let us know.
The following code snippet will select the row that you right-clicked on, before displaying the context menu. It assumes a column-label height of 17 pixels.. if you've got a suggestion for improving this please let us know.
Code:
on right-mouse-down of browse <browsename>
do:
if browse <browsename>:multiple then
browse <browsename>:deselect-rows().
browse <browsename>:select-row(int(truncate((last-event:y - 17) / (browse <browsename>:row-height-pixels + 4), 0)) + 1) no-error.
end.