From Xojo Documentation
Supported PlatformsProject Types: Web Platforms: macOS, Windows, Linux
- For desktop applications, see ContainerControl.
New in 2010r4
A WebContainer is a way to create a group of controls that are treated as a single control. A WebContainer is a great way to simplify complex web page layouts. In addition, with a WebContainer, you can create reusable controls to include on multiple web pages or on other web containers.
This class is useful for creating reusable sets of controls. Itʼs also useful for creating scrollable views. You can create a scrollable view by creating a WebContainer and then after placing it on a webpage or other WebContainer, make the WebContainer on the page smaller than it would normally appear. This will cause scrollbars to automatically be added. You can control this scrollbar behavior via the ScrollbarsVisible property.
You can also use a WebContainer to center your page contents in the browser window. To do so, put all your controls on a WebContainer and then add the WebContainer to a WebPage. For the properties of the WebContainer, select LockVertical and LockHorizontal to ensure that the WebContainer always stays centered in the page displayed in the browser.
WebContainers can only contain controls that are subclasses of WebControl.
This code adds a WebContainer, called LoginContainer, to a web page at run-time: