Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Finding the absolute location of mouse-down events

0 views
Skip to first unread message

Eli Smith

unread,
May 11, 1996, 3:00:00 AM5/11/96
to

Here's a question for all of you - how do you determine the *absolute*
location of a mouse-down event on the users screen? ie, if I wanted a
new window to pop up where I clicked on a frame, how would I determine
where that is? Determining where the event occured in the frame is no
problem; but I can't figure out where to find out where the frame is in
the windows environment...

thanks for any help!

Eli


Jan Newmarch

unread,
May 13, 1996, 3:00:00 AM5/13/96
to

Use location() from Component. It works in a Frame too.

Jan
--
Jan Newmarch, Information Science and Engineering,
University of Canberra, PO Box 1, Belconnen, Act 2616
Australia. Tel: (Aust) 6-2012422. Fax: (Aust) 6-2015041
AARNet: j...@ise.canberra.edu.au

Matt Welsh

unread,
May 15, 1996, 3:00:00 AM5/15/96
to

Eli Smith wrote:
>
> Here's a question for all of you - how do you determine the *absolute*
> location of a mouse-down event on the users screen? ie, if I wanted a
> new window to pop up where I clicked on a frame, how would I determine
> where that is? Determining where the event occured in the frame is no
> problem; but I can't figure out where to find out where the frame is in
> the windows environment...
>
> thanks for any help!
>
> Eli


Eli...

Use the method

public Point location()

which returns the current location of this component. The location will
be in the parent's coordinate space.

Hope this helps...
Matt

0 new messages