Cursor and/or Element Position

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
Shon
Profound User
Posts: 27
Joined: Wed Dec 14, 2011 12:25 pm
First Name: Shon
Last Name: Malone
Company Name: Summit
Phone: (863) 668-7657
Address 1: 2310 Commerce Point Drive
City: Lakeland
State / Province: Florida
Zip / Postal Code: 33801
Country: United States
Contact:

Cursor and/or Element Position

Post 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
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Cursor and/or Element Position

Post 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.
Shon
Profound User
Posts: 27
Joined: Wed Dec 14, 2011 12:25 pm
First Name: Shon
Last Name: Malone
Company Name: Summit
Phone: (863) 668-7657
Address 1: 2310 Commerce Point Drive
City: Lakeland
State / Province: Florida
Zip / Postal Code: 33801
Country: United States
Contact:

Re: Cursor and/or Element Position

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests