About refreshing a web page.

I have a web page with a WebContainer in which I embed all my controls.

All my controls are based on a WebContainer with a WebCanvas inside it.
(I’m not sure the WebContainer around the WebCanvas is strictly necessary but that’s how it is at the moment)

When my WebPage is ‘Open’ I create all my controls and put them in a list.
When my Page is ‘Shown’ I go through the list of my Controls and Embed them within the top level WebContainer.

Now at some point the ‘mouse enters’ one of the Canvas Objects. When that happens I want to pop up a ‘hover over’ like window.
This window is just another WebContainer.

So how do I get this to pop up on my web page and disappear when the mouse exit event is raised?
i.e. what is the opposite of EmbedWithin?

The Canvas’s parent is a WebContainer and it’s Parent is the top level webContainer. Must I send events ‘up’ by defining new events? (me.parent.parent seems possible but not wise)

Must I somehow add my Control to the ‘list’ of all controls, and if so how, and if so how do I redraw my page?
There are allready embeded object in the top level control, must they be deleted and re-added?

Help! :slight_smile:

First of all, WebContainer.Close will remove the control from the page, although you might want to just set Visible to False so you can reuse it quickly.

I’m more concerned with speed though. This isn’t going to be super fast on the Internet. Every mouse event must be sent back to the server to execute Xojo code, so you’re going to have a delay.

If you truly want this to be snappy, you’ll probably need to use the WebSDK to move all of that logic to the browser.

Thanks Greg.