From Xojo Documentation
|You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!|
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. The WebContainer.ScrollDirection property controls which directions the user can scroll the WebContainer if any.
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 WebUIControl.
This code adds a WebContainer, called LoginContainer, to a web page at run-time: