Split Bars
A split bar divides a form or widget horizontally or vertically, making it possible to resize the resulting panes by dragging the split bar or resizing the window. Alternatively, it can be locked to protect an area of the form from being resized or hidden.
Positioning the mouse cursor over a movable split bar changes it to a double arrow, which you can drag to move the split bar. ( or ).
Split bars are particularly useful in forms that contain a tree widget or grid. They can be used to resize tree and list view panes of the tree widget, or to manage the layout of the fixed areas of the form that contains a grid widget.
When defining the form, the order in which split bars are added affects their length and attachment points. Each split bar serves as an anchor for the next split bar. Thus, if you add a horizontal split bar, it runs the entire width of the form. If you then create a vertical split bar, it runs from the horizontal split bar to the edge of the form.
- First split bar (normal width)
- Second split bar (thin width)
- Third split bar (narrow width)
- Fourth split bar (normal width)
Note: The appearance of the split bar is determined by the value of its Style property.
Properties
Split bars have the following properties, which can be set using the pop-up menu in the Canvas:
- Attach—specifies the border to which the split bar remains attached when the form is resized
- Style—determines the appearance of the split bar, or hides it. Hiding a split bar is useful if it is locked.
- Lock—locks the split bar into position so it cannot be moved.
Note: These properties are stored as a Window property SPLIT
, but you should only edit them using the tools provided in the Canvas.
Restrictions
The following restrictions apply when using split bars:
- Scroll bars do not appear in panes that are formed by split bars.
- A contained form with split bars should have a layout that fits the widget, otherwise the runtime form instance may be larger than the limits defined by the split bars. For example, you cannot make a contained form fit into a portrait Tab widget and later use it in Form Container with landscape orientation.
Storing Layout State
At runtime, Uniface saves the split bar positions as part of the form state in the Registry. Uniface does not store the layout of split bars when:
- They are placed on a contained form (used in a Tab, TabEx, or Form Container widget).
- The form is run in test mode from the Uniface IDE or using /tst.