ContainerControl.EmbedWithinPanel

From Xojo Documentation

Method

ContainerControl.EmbedWithinPanel(ContainingPanel as PagePanel, Page as Integer, [left as Integer], [top as Integer], [width as Integer], [height as Integer])

Supported for all project types and targets.

Embeds the ContainerControl on a page in the passed PagePanel or TabPanel.

Notes

An instance of a ContainerControl can only be embedded into one page.

The ContainerControl is embedded on the passed page and the containing control is the parent of the ContainerControl. The optional Left and Top parameters determine the location of the top-left corner, relative to the containing control, not the parent window. The optional parameters Width and Height determine the size of the ContainerControl.

Sample Code

This example adds a new tab to a TabPanel and then add a ContainerControl to it:

MainTab.Append("New Tab")
Dim tabNum As Integer
tabNum = MainTab.PanelCount - 1

Dim cc As New MyContainer
cc.EmbedWithinPanel(MainTab, tabNum)