This product is discontinued. This page remains as documentation reference for those who purchased TP_WebKit while it was in active development.
WebFocus captures focus events on WebTextArea
and WebTextField
to work around feedback case #61985 - GotFocus and LostFocus events don't fire
WebKey brings KeyDown events back to Xojo Web 2.0. Add the control to any WebPage
or WebContainer
to track keys on that page.
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.
MessageAllSessions allows developers to easily send a message to each connected WebSession
. Additionally, the session that sent the message receives a message sent confirmation.
MouseDown
, MouseEnter
, and 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.
WebPage
or WebContainer
that holds the WebTextArea
or WebTextField
you want to listen for focus events on.ControlReady
event to automatically listen for key events as soon as possible.AddListener
on an instance to begin listening for key events.
WebFocus1.AddListener(myTextField)
WebTextControl
TP_WebFocus1.RemoveListener(myTextField)
WebPage
or WebContainer
you want to listen for key events on. ControlReady
event to automatically listen for key events as soon as possible.Listen
on an instance to begin listening for key events
TP_WebKey1.Listen
Deafen
on a listening instance to stop listening for key events
TPWebKey1.Deafen
WebPage
or WebContainer
WebControl
to listen for events
TP_WebMouse1.AddListener(ctlSomeControl)
Note: The 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.
WebControl
TP_WebMouse1.RemoveListener(ctlSomeControl)
WebPage
or WebContainer
you want to listen for key events on. ControlReady
event to automatically listen for key events as soon as possible.Listen
on an instance to begin listening for key events
TP_WebKey1.Listen
Deafen
on a listening instance to stop listening for key events
TPWebKey1.Deafen
Name | Description |
---|---|
MouseDown(WebControl, X, Y) | Raised when the user has pressed the mouse button down. The X and Y parameters passed are the mouse position of the click relative to the tracking control. |
MouseEnter(WebControl) | Raised when the mouse enters the WebControl that is passed. |
MouseExit(WebControl) | Raised when the mouse leaves the WebControl that is passed. |
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 200ms . The stop time can be adjusted in the Javascript source. A MouseDown event will cancel any queued MouseMove event. The X and Y parameters passed are the mouse position relative to the tracking control. |
Name | Description |
---|---|
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 ControlID . |
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. |
Name | Description |
---|---|
PageX as Integer | The global X coordinate of the mouse on the page. This is updated when tracking MouseMove events, and can be checked on demand. |
PageY as Integer | The global Y coordinate of the mouse on the page. This is updated when tracking MouseMove events, and can be checked on demand. |
TrackMouseDown as Boolean | Set True to track MouseDown events. |
TrackMouseEnter as Boolean | Set True to track MouseEnter events. |
TrackMouseExit as Boolean | Set True to track MouseExit events. |
TrackMouseMove as Boolean | Set True to track MouseMove events. |
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.