Adding Panes to Paned Containers
This section covers the following topics:
Creating a Paned Container
The following code sample creates a vertical paned container as a top view:
IlvPanedContainer* container = new IlvPanedContainer(display,
"Paned Container",
"Paned Container",
IlvRect(0, 0, 500, 500),
IlvVertical);
You can retrieve the specified orientation and modify it using the
Once you have created a paned container, you can add panes to it with the
Modifying the Layout of a Paned Container
container->addPane(pane1);
container->addPane(pane2);
container->addPane(pane3);
container->updatePanes();
Retrieving Panes
You can get the index of a specific pane with
Paned containers reference the panes they hold using indexes. However, we strongly recommend that you do not reference panes using their indexes, because these can change for internal reasons. Instead, use the member function setName to identify panes.
Encapsulating a Paned Container in a View Pane
Encapsulating a paned container in a view pane allows you to build complex nested pane structures, as shown in Horizontal and Vertical Paned Container and Encapsulated Paned Container.
The following code sample encapsulates a horizontal paned container in a view pane.
First we create the main vertical paned container:
IlvPanedContainer* container = new IlvPanedContainer(display,
"Paned Container",
"Paned Container",
IlvRect(0, 0, 500, 500),
IlvVertical);
Then we create a horizontal paned container and encapsulate it in a view pane:
IlvPanedContainer* innerContainer = new IlvPanedContainer(container,
IlvRect(0, 0, 500,200),
IlvHorizontal);
IlvViewPane* viewPane = new IlvViewPane("ViewPane", innerContainer);
In our example, we have created innerContainer as a subview of container. Although this practice is not mandatory, we strongly recommend that you proceed that way when creating your own applications. If you do not specify container as the parent of innerContainer, it will be reparented when added to container.
The last step consists of adding the view pane to the main paned container:
container->addPane(viewPane);
You can get the view pane that encapsulates a given paned container using