WebContainer.EmbedWithin
From Xojo Documentation
Supported for all project types and targets.
Embeds the WebView in the current page without drawing the window frame, title bar, title bar widgets, grow handle, and so forth.
Notes
The Left and Top parameters determine the location of the top-left corner, relative to the containing page. The parameters Width and Height determine the size of the embedded view.
You can use EmbedWithin in to dynamically add controls to a page. Add the control (or controls) you want to add to a WebContainer and then use EmbedWithin to add the container to the page at run-time.
If the LockRight and LockBottom properties are set to True on the Container (using the Inspector), the values are not retained when you create a new container instance to embed. Instead, set these values to True before calling EmbedWithin:
c.LockRight = True
c.LockBottom = True
c.EmbedWithin(Self, 0, 0, c.Width, c.Height)
Example
This code adds a WebContainer, called LoginContainer, to a web page at run-time: