TP_WebMouse fills the need for mouse events on any control in Xojo Web 2.0. The class can track move, click, enter, and exit events. These events are sent to the server for developers to handle as necessary.
TP_WebKey brings KeyDown events back to Xojo Web 2.0. Add the control to any
WebContainer to track keys on that page.
MouseMove, the event is sent to the server when the mouse has stopped moving for
200ms. This reduces traffic while still keeping the developer reasonably aware of the mouse location.
MouseExit events are sent as soon as they happen.
MouseDown will cancel any queued move event, and send the
MouseDown event with coordinates. This prevents out of order events.
WebControlto listen for events
Opening event is too soon to listen. Use the
Shown event of the page or container to attach listeners. It is also safe to attach listeners any time after the
Shown event has occurred.
WebContaineryou want to listen for key events on.
ControlReadyevent to automatically listen for key events as soon as possible.
Listenon an instance to begin listening for key events
Deafenon a listening instance to stop listening for key events
|MouseDown(WebControl, X, Y)||Raised when the user has pressed the mouse button down. The
|MouseEnter(WebControl)||Raised when the mouse enters the
|MouseExit(WebControl)||Raised when the mouse leaves the
|MouseMove(WebControl, X, Y)||Raised when the user moves the mouse and has stopped moving. This event is only raised when the mouse stops moving for
|AddListener(WebControl)||Add a mouse events listener for the passed control. Will listen for the events selected.|
|FindListener(String) as WebControl||Internal method for finding the listening WebControl by
|RemoveListener(WebControl)||Stops listening for all events from the passed control. This can be useful for reducing traffic and optimization. No errors are raised if the control isn't actively listening.|
|PageX as Integer||The global
|PageY as Integer||The global
|TrackMouseDown as Boolean||Set
|TrackMouseEnter as Boolean||Set
|TrackMouseExit as Boolean||Set
|TrackMouseMove as Boolean||Set
Warning: Sending mouse and key events to the server consumes a lot of traffic and can be considered wasteful. This project is made available to developers to help build their project, but does not provide performance protection. It is up to the developer to ensure their project has enough resources.