Find Screen (Cursor) Location

Posted by acorkum on 20-Jan-2009 08:45

I am trying to position a frame dynamically but need to know the screen (row) position of the cursor. I have scoured the manuals but unable to find anything. Is there a way to find the current row location of the cursor?



All Replies

Posted by Admin on 20-Jan-2009 09:14

Since you are talking about a Frame, I assume you are still on the old UI, right?

Are you are in some event handler (like MOUSE-SELECT-CLICK )?. Check the LAST-EVENT:X and LAST-EVENT:Y property (the LAST-EVENT Handle is valid in an event handler).

Posted by acorkum on 20-Jan-2009 13:08

I am coding for character (CHUI). I tried LAST-EVENT:X and just get a "?".

Posted by Simon de Kraa on 20-Jan-2009 15:20

Maybe use the self:row and self:column attributes? And self:cursor-offset for fill-ins?

Posted by acorkum on 21-Jan-2009 06:54

Getting close... I guess I should have begun with more details. The SELF:ROW does return an integer. However, I am using a (scrollable) browse widget in the frame. The SELF:ROW will return the position of the browse widget and not the actual screen position.

Posted by Simon de Kraa on 21-Jan-2009 07:26

Maybe self:focused-row?

Posted by acorkum on 21-Jan-2009 08:50

Yes, that will work. Thanks!

This thread is closed