# Listbox DoubleClick wrong computed cell coordinates

**URL:** <https://forum.xojo.com/t/listbox-doubleclick-wrong-computed-cell-coordinates/43078>\
**Category:** Linux\
**Created:** [April 19, 2018, 5:57pm UTC](https://forum.xojo.com/t/listbox-doubleclick-wrong-computed-cell-coordinates/43078 "2018-04-19T17:57:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maurizio\_Rossi](https://forum.xojo.com/letter_avatar_proxy/v4/letter/m/ba8739/32.png) [@Maurizio\_Rossi](https://forum.xojo.com/u/Maurizio_Rossi)\
**Post date:** [April 19, 2018, 5:57pm UTC](https://forum.xojo.com/t/listbox-doubleclick-wrong-computed-cell-coordinates/43078/1 "2018-04-19T17:57:01Z")

</div>

I’m unable to get the correct value for row/column coordinates on Listbox’s DoubleClick event using the code reported in documentation.  
The same code works as intended on Windows but not on Linux.  
The row value is totally wrong, usually higher but in some case results in a negative value.  
The listbox in on a page and not in a container.  
The problem can be reproduced on Debian and Mint using both 2017r2.1 and 2018r1.

What’s wrong?

---

<div class="post-metadata">

**Author:** ![Axel\_Schneider](https://forum.xojo.com/user_avatar/forum.xojo.com/axel_schneider/32/465_2.png) [@Axel\_Schneider](https://forum.xojo.com/u/Axel_Schneider)\
**Post date:** [April 19, 2018, 7:30pm UTC](https://forum.xojo.com/t/listbox-doubleclick-wrong-computed-cell-coordinates/43078/2 "2018-04-19T19:30:55Z")

</div>

This is what I use in 2016R4.1 on Mint 18

```auto
		Dim xValue As Integer
		xValue = System.MouseX - Me.Left - Self.Left
		
		Dim yValue As Integer
		yValue = System.MouseY - Me.Top - Self.Top
		
		Dim row, column As Integer
		row = Me.RowFromXY(xValue, yValue)
		column=Me.ColumnFromXY(xValue, yValue)
		
		MsgBox("You double-clicked in Row " + Str(row) + ", Column " + Str(column))
```

---

<div class="post-metadata">

**Author:** ![Maurizio\_Rossi](https://forum.xojo.com/letter_avatar_proxy/v4/letter/m/ba8739/32.png) [@Maurizio\_Rossi](https://forum.xojo.com/u/Maurizio_Rossi)\
**Post date:** [April 19, 2018, 7:43pm UTC](https://forum.xojo.com/t/listbox-doubleclick-wrong-computed-cell-coordinates/43078/3 "2018-04-19T19:43:16Z")

</div>

Thank you Axel for your reply.  
I’ll post here tomorrow the results of your code in my project.

---

<div class="post-metadata">

**Author:** ![Axel\_Schneider](https://forum.xojo.com/user_avatar/forum.xojo.com/axel_schneider/32/465_2.png) [@Axel\_Schneider](https://forum.xojo.com/u/Axel_Schneider)\
**Post date:** [April 19, 2018, 8:43pm UTC](https://forum.xojo.com/t/listbox-doubleclick-wrong-computed-cell-coordinates/43078/4 "2018-04-19T20:43:33Z")

</div>

I have tested in 2018R1 and it does not work, as you see here - [https://forum.xojo.com/47269-big-button-in-msgbox-2018r1](https://forum.xojo.com/47269-big-button-in-msgbox-2018r1)

it shows me -1 for the last row and 1 for the first row, same for column.

---

<div class="post-metadata">

**Author:** ![Maurizio\_Rossi](https://forum.xojo.com/letter_avatar_proxy/v4/letter/m/ba8739/32.png) [@Maurizio\_Rossi](https://forum.xojo.com/u/Maurizio_Rossi)\
**Post date:** [April 20, 2018, 4:50am UTC](https://forum.xojo.com/t/listbox-doubleclick-wrong-computed-cell-coordinates/43078/5 "2018-04-20T04:50:49Z")

</div>

I create a feedback case ASAP.  
Thank you.

---

<div class="post-metadata">

**Author:** ![Maurizio\_Rossi](https://forum.xojo.com/letter_avatar_proxy/v4/letter/m/ba8739/32.png) [@Maurizio\_Rossi](https://forum.xojo.com/u/Maurizio_Rossi)\
**Post date:** [April 20, 2018, 6:28am UTC](https://forum.xojo.com/t/listbox-doubleclick-wrong-computed-cell-coordinates/43078/6 "2018-04-20T06:28:11Z")

</div>

\<[https://xojo.com/issue/51981](https://xojo.com/issue/51981)\>

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 7:11pm UTC](https://forum.xojo.com/t/listbox-doubleclick-wrong-computed-cell-coordinates/43078/7 "2020-10-29T19:11:01Z")

</div>


