Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Re: ColumnFromXY/RowFromXY [SOLVED] (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Re: Quick question about GetFolderItem.Child() method
Next thread: MBS PortAudio.rbp crashes with 44100 sample rate


Re: ColumnFromXY/RowFromXY   -   Lars Jensen
  Re: ColumnFromXY/RowFromXY [SOLVED]   -   John Kouraklis
   Re: ColumnFromXY/RowFromXY [SOLVED]   -   Arnaud Nicolet
    Re: ColumnFromXY/RowFromXY [SOLVED]   -   John Kouraklis
     Re: ColumnFromXY/RowFromXY [SOLVED]   -   Markus Winter
      Re: ColumnFromXY/RowFromXY [SOLVED]   -   John Kouraklis
     Re: ColumnFromXY/RowFromXY [SOLVED]   -   Arnaud Nicolet
   Re: ColumnFromXY/RowFromXY [SOLVED]   -   Markus Winter
    Re: ColumnFromXY/RowFromXY [SOLVED]   -   Markus Winter

Re: ColumnFromXY/RowFromXY [SOLVED]
Date: 03.08.12 01:26 (Fri, 3 Aug 2012 01:26:19 +0100)
From: John Kouraklis
Hi to all,

I got was was wrong. The methods work properly. The X,Y values must be the
distance from the listbox edges.

When I had the listbox in a window it works ok but I had the listbox into
a container and then the container embedded in a window. I had to take
into account the distance of the container from the window edges.

Thank you all for the help anyway

John

On 02/08/2012 15:55 , "Lars Jensen" <<email address removed>> wrote:

>I don't have access to Win7 at the moment. I tried it on WinXP with
>RS2011 4.3 and it works as expected. If you can reproduce an error, I
>would encourage you to file a feedback report.
>
>lj
>
>_______________________________________________
>Unsubscribe or switch delivery mode:
><http://www.realsoftware.com/support/listmanager/>
>Search the archives:
><http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: ColumnFromXY/RowFromXY [SOLVED]
Date: 03.08.12 11:59 (Fri, 03 Aug 2012 12:59:12 +0200)
From: Arnaud Nicolet
Le 3 août 2012 à 02:26 Matin, John Kouraklis a écrit:

> I got was was wrong. The methods work properly. The X,Y values must be the
> distance from the listbox edges.
>
> When I had the listbox in a window it works ok but I had the listbox into
> a container and then the container embedded in a window. I had to take
> into account the distance of the container from the window edges.

I just want to point out something: you seem to think that relying on RowFromXY is more reliable than the ListIndex, but it's not. You can never have a DoubleClick event without having the corresponding row selected so ListIndex is 100% reliable in this case (unless you change it from code, but it's your knowledge).
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: ColumnFromXY/RowFromXY [SOLVED]
Date: 03.08.12 14:52 (Fri, 3 Aug 2012 14:52:44 +0100)
From: John Kouraklis


On 03/08/2012 11:59 , "Arnaud Nicolet" <<email address removed>> wrote:

>Le 3 août 2012 à 02:26 Matin, John Kouraklis a écrit:
>
>> I got was was wrong. The methods work properly. The X,Y values must be
>>the
>> distance from the listbox edges.
>>
>> When I had the listbox in a window it works ok but I had the listbox
>>into
>> a container and then the container embedded in a window. I had to take
>> into account the distance of the container from the window edges.
>
>I just want to point out something: you seem to think that relying on
>RowFromXY is more reliable than the ListIndex, but it's not. You can
>never have a DoubleClick event without having the corresponding row
>selected so ListIndex is 100% reliable in this case (unless you change it
>from code, but it's your knowledge).

Arnaud,

I don't think rowfromXY is more reliable> I followed your advice but at
one point it was not giving proper results (big surprise again)(. I will
check it again

Thank you

John


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: ColumnFromXY/RowFromXY [SOLVED]
Date: 03.08.12 15:45 (Fri, 03 Aug 2012 16:45:54 +0200)
From: Markus Winter
> I followed your advice but at
> one point it was not giving proper results (big surprise again)

What did you do?

MfG

Markus (curious)


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: ColumnFromXY/RowFromXY [SOLVED]
Date: 03.08.12 16:49 (Fri, 3 Aug 2012 16:49:54 +0100)
From: John Kouraklis
Sometimes I am surprised with RS. While things work properly, then some
details "exhibit" different behavior without any obvious reason.

But, of course, the possibilities are that the problem lies on me and not
on RS--but I am not so sure

On 03/08/2012 15:45 , "Markus Winter" <<email address removed>> wrote:

>> I followed your advice but at
>> one point it was not giving proper results (big surprise again)
>
>What did you do?
>
>MfG
>
>Markus (curious)
>
>_______________________________________________
>Unsubscribe or switch delivery mode:
><http://www.realsoftware.com/support/listmanager/>
>Search the archives:
><http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: ColumnFromXY/RowFromXY [SOLVED]
Date: 03.08.12 15:27 (Fri, 03 Aug 2012 16:27:21 +0200)
From: Arnaud Nicolet
Le 3 août 2012 à 15:52 Soir, John Kouraklis a écrit:

> I don't think rowfromXY is more reliable> I followed your advice but at
> one point it was not giving proper results (big surprise again)(. I will
> check it again

Curious. It's not that I specifically want that you use this method, but if it can fail, it's surprising!
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: ColumnFromXY/RowFromXY [SOLVED]
Date: 03.08.12 09:12 (Fri, 03 Aug 2012 10:12:59 +0200)
From: Markus Winter
> I had to take
> into account the distance of the container from the window edges.

How did you do that?

Or to refphrase: how do I refer to the containerControl and not to the
Window?

MfG

Markus


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: ColumnFromXY/RowFromXY [SOLVED]
Date: 03.08.12 09:18 (Fri, 03 Aug 2012 10:18:56 +0200)
From: Markus Winter
>> I had to take
>> into account the distance of the container from the window edges.
>
> How did you do that?
>
> Or to refphrase: how do I refer to the containerControl and not to the
> Window?
Thanks - figured it out: with TrueWindow

column=Me.ColumnFromXY( System.MouseX - Me.Left - Me.Parent.Left -
me.TrueWindow.Left, System.MouseY - Me.Top - Me.Parent.Top -
me.TrueWindow.Top )

MfG

Markus


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>