Mouse Enter and Leave Events.

If I have a WebCanvas and I get a mouse enter event, and want to pop up a window ‘near’ the mouse position how do I:
a) get the current mouse location
b) translate it into parent or grand parent container control absolute position (x,y)

[quote=192383:@Brian O’Brien]If I have a WebCanvas and I get a mouse enter event, and want to pop up a window ‘near’ the mouse position how do I:
a) get the current mouse location[/quote]

http://documentation.xojo.com/index.php/WebControl.MouseMove

All controls are relative to the WebPage.

I see so I have to trap the move move event and keep track of where I last saw it and use those co-ordinates in the mouse enter event handler?

Brian, I don’t follow you.

That popup you talk about, is it supposed to follow the mouse cursor or simply appear when the mouse enters the Container control ?

your right… I guess I don’t need the mouse position, just the canvas co-ordinates

Be careful with MouseMove. It’s possible to overload your app with events. Remember that ALL events are processed on the server which means that MouseMove will send an event every time it registers a mouse movement. That may not be good for you.

I’m not sure there is a good Xojo-way of doing this without resorting to Javascript solution.

[quote=192420:@Bob Keeney]Be careful with MouseMove. It’s possible to overload your app with events. Remember that ALL events are processed on the server which means that MouseMove will send an event every time it registers a mouse movement. That may not be good for you.

I’m not sure there is a good Xojo-way of doing this without resorting to Javascript solution.[/quote]

I think he does not need MouseMove for what he seems to want to achieve: display a box when the mouse is over a webcontainer, and remove it when it exits. All that can be achieved with MouseEnter and MouseExit only.