Obtain the coordinates of the mouse in the graphics objects
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Obtain the coordinates of the mouse in the graphics objects
Is it possible to click the mouse cursor on the image of the graphic to get the coordinates of the cursor inside it in pixels? If possible, how to do it?
Re: Obtain the coordinates of the mouse in the graphics obje
oStatic:lbClick := {|a,b,o|aCoords := b}
The eXpress train is coming - and it has more cars.
Re: Obtain the coordinates of the mouse in the graphics obje
To track cursor position with any move over the object:
Code: Select all
@ x,y DCSTATIC ... EVAL {|o|o:Motion := {|aPos|oPosObject:SetCaption(Str(aPos[1])+/Str(aPos[2]))}}
@ a,b DCSAY '' OBJECT oPosObject SIZE 20,1
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: Obtain the coordinates of the mouse in the graphics obje
Somewhere I saw a simple graphical editor similar to Paint, made in Alaska. And now could not find it. Tell me, please, where to find the source.