Page 1 of 1

application.GetMouseClickPosition

PostPosted: Sat Jul 31, 2004 7:50 am
by idoctor
I need to know the exact posiiton of where a user clicks on the screen. The only way I know how to do this is to put a bunch of buttons on a form and when a user clicks on it captures the coordinates of the button. The problem is resolution. If you put enough buttons on the screen to get good resolution the redraws become very slow. It would be really nice to have the application return the position of a mouse click relative to the borders of a form.


John McCann

PostPosted: Wed Aug 04, 2004 12:36 pm
by Jan Blok
Where whould the position be usefull for?, I can imagine you want the position within an image, but within the form I do not understand.

PostPosted: Fri Aug 06, 2004 6:08 pm
by idoctor
I want the x-y coordinates so I can place a label at the coordinates.

John McCann

Re: application.GetMouseClickPosition

PostPosted: Tue Dec 29, 2009 1:23 am
by maria
I would like to have this method, too, because I need to show a popup menu on a label in tableview.
In tableview without records I can't find the coordinates of the label on which the user clicked because there is no field and no label if there's no records (viewtopic.php?f=2&t=13446).

Any chance of having this functionality or any other way around the problem?

Cheers,
Maria

Re: application.GetMouseClickPosition

PostPosted: Tue Dec 29, 2009 6:52 pm
by jcompagner
what event is generated where you want to ask that mouse position?

Re: application.GetMouseClickPosition

PostPosted: Wed Dec 30, 2009 3:04 am
by maria
jcompagner wrote:what event is generated where you want to ask that mouse position?


That would be onRightClick but I reckon after the labelFor labels in the tableview header are fixed, the necessity of this one will decrease for me.

Re: application.GetMouseClickPosition

PostPosted: Wed Dec 30, 2009 10:23 am
by jcompagner
And all the click events should give you the mouse x,y position in the JSEvent object.
If that is not the case for certain events please make a case for that.

Re: application.GetMouseClickPosition

PostPosted: Thu Dec 31, 2009 1:14 am
by maria
jcompagner wrote:And all the click events should give you the mouse x,y position in the JSEvent object.
If that is not the case for certain events please make a case for that.


Haven't checked that yet.
Thanks for suggestion.