Resizing Panes
Panes can be resized.
This section covers the following topics:
Setting the Resize Mode and the Minimum Size of a Pane
When you resize a paned container, the panes it holds are resized according to their resizing mode. A pane can have one of three resizing modes:
Fixed—Fixed panes are never resized.
Elastic—Elastic panes are always resized.
Resizable—Resizable panes are resized only if their paned container does not include elastic panes.
To set the resize mode of a pane, use the
IlvPane::setResizeMode member function. By default, the resize mode of new panes is fixed.
You can also provide a minimum size for a pane. To set a minimum size for a pane, use the IlvPane::setMinimumSize member function. The minimum size of new panes is 1 by default.You cannot make a pane smaller than the specified minimum size.
Note: The resize mode and the minimum size of a pane can be defined for both the horizontal and vertical directions. |
Resizing Panes With Sliders
A slider pane is an instance of the class
IlvSliderPane, a subclass of
IlvGraphicPane, which you can drag to resize adjacent panes.
Slider Pane
Using Automatic Slider Creation
By default, a paned container automatically creates slider panes between resizable and elastic panes.
Note: Slider panes are actually created only after you call the member function IlvPanedContainer::updatePanes. This is very important as it affects the index number originally assigned to the panes. For example, if you create an empty container to which you add two resizable panes, their indexes will be 0 and 1, respectively. After calling updatePanes, the indexes of the resizable panes will be 0 and 2, the slider pane being assigned the index number 1. See Retrieving Panes. |
When the paned container creates automatic slider panes, it calls the IlvPanedContainer::createSliderPane member function, which you can override to create custom slider panes.
If you do not want that slider panes be created automatically, you can call the IlvPanedContainer::manageSliders member function with false as its argument. If you disable this feature, and if you still want resizable and elastic panes to be resizable using a slider, you must create sliders panes by hand and add them to the paned container.
Version 6.1
Copyright © 2016, Rogue Wave Software, Inc. All Rights Reserved.