On Linux RowFromXY and ColumnFromXY give wrong answers, so for example double-clicking on a row to open some data will result in the wrong data being opened. The feedback report doesn’t make the seriousness of the bug particularly clear but this bug basically kills many Linux projects dead and needs to be urgently fixed in the next dot release.
yes, see Listbox DoubleClick wrong computed cell coordinates
it seems like row and column starts now at 1 and not at 0 anymore.
Norman posted a workaround:
On LInux the header height is not being accounted for
A work around would be to remove the header height as well
Dim ctlX, ctlY As Integer
#If targetlinux
ctlX = System.MouseX - Me.Left - Self.Left
ctlY = System.MouseY - Me.Top - Self.Top - Me.HeaderHeight
#Else
ctlX = System.MouseX - Me.Left - Self.Left
ctlY = System.MouseY - Me.Top - Self.Top
#EndIf
row = me.rowFromXY( ctlX, ctlY)
column = me.columnFromXY( ctlX, ctlY)
Link: <https://xojo.com/issue/51981>
User “Maurizio Rossi” has updated case #51981.
The following comments were left:
»»File(s) attached: doubleclick.zip
It seems that RowFromXY() does not take in account of other elements in the Window.
For example if the window has a toolbar the suggested workaround does not work.