Page 1 of 1
Cursor and/or Element Position
Posted: Mon Apr 14, 2014 9:32 am
by Shon
I need to retrieve the Left and Top position of the cursor based on a mouse click or double click. I need to position a newly called window program relative to the current cursor position in the calling program. I have searched and have not found an easy way to do this. If the cursor position cannot be gotten, is there a way to return the Top and Left position of an element? Any assistance would be greatly appreciated. Thanks
Re: Cursor and/or Element Position
Posted: Mon Apr 14, 2014 4:19 pm
by Scott Klement
The X/Y position of the cursor should be included in the event object given for the click event...
Calculating the position where to place another element can be very challenging, however, since the cursor is given relative to the entire client area of the window, whereas the element would be positioned relative to it's container.... so you'd need to calculate the offset between them.
Re: Cursor and/or Element Position
Posted: Thu Apr 17, 2014 3:53 pm
by Shon
Could you please elaborate on the "event object given for the click event"? I am an RPGLE programmer and the Java and object oriented stuff is fairly new to me. I assume that there is some sort of javascript that would be used to retrieve the info you are talking about. Thanks in advance for the explanation.