On Mon, Feb 25, 2008 at 4:57 PM, Nathan Taylor <[EMAIL PROTECTED]> wrote:
>
> Could someone please tell me the quickest way to get the X,Y coordinates of
> my mouse? I know the MouseEvent getPageX() and getPageY() exposes this
> information, but I am unsure how to get a MouseEvent from the document.

Hi Nathan,

Are you absolutely sure that you want a mouse event from the DOCUMENT
and not from some particular widget?  Do you really care where the
mouse is all of the time, or only when it's over some particular
widget?

The general mechanism is to call widget.addEventListener(eventType,
functionToCall).  In your case, eventType is probably "mousemove" or
"mousedown" or "mouseup" or "click" or "dblclick" or maybe evben
"mouseout" or "contextmenu".  You likely want the object on which you
addEventListener (widget) to be the widget highest in the hierarchy:
the one with the smallest scope that is of interest.

Derrell

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to