Hello everyone.
Why Web WebCanvas and WebContainer have not mouse events?
I need a control where I can interact with the mouse, with events like MouseDown, MouseUp, MouseWheel, MouseDrag, etc. What can I use?
I believe mouse and keyboard events were lost during the transition from Web 1.0 to 2.0. If I remember correctly, it had to do with some performance issues due to the need for lots of round trips between the client and the server. I don’t know how much of this got rectified.
For a while @Tim_Parnell had a product that brought them back, but I believe it’s now EOL’d.
@Anthony_G_Cyphers has a solution that still stands today in GraffitiSuite Web Edition with the GraffitiEventManager.
Others can probably fill in more here and correct anything I said that might be a bit off kilter.
The problem is the asynchronous nature of Web. If the Xojo code was compiled to JavaScript (or WebASM) then these types of operations would be easier to support, but latency in round trips is going to kill most things you want to do with mouse events, especially dragging. I support this by using JavaScript to handle as much as possible then return only the data necessary to the server.
If you want to build something complex using mouse events, then you should investigate building a WebSDK component.
Yes, TP_WebKit is no longer available. I recommend the GraffitiSuite solution to anyone who is interested in what TP_WebKit offered. The functionality is all there!