Splitter

By using the splitter object an application can be created that uses multiple areas next to each other that can be smoothly added and collapsed.

How to create a splitter

  1. Click on the Splitter button .
  2. Left-click in the panel work area and drag the mouse with the left mouse button held down.
  3. Release the mouse button to create a splitter area.
  4. The splitter has been added to your panel.
  5. By using the function "addModule" one or more modules can be added to the splitter, e.g.
    for( int i = 0; i < 3;i++)
      {
        this.addModule("myModule_" + i);
        RootPanelOnModule("about.pnl", "about", "myModule_" + i, "");
    }
  6. The separate areas of the splitter can now be manually resized by using the mouse to adjust them to the necessary sizes that the user requires for the current task at hand.
  7. Currently not used areas can also be collapsed by reducing the in size and therefore hide them.
Figure 1. Splitter with 3 areas.

A list of all available Splitter functions can be found under Splitter Functions.

Events

The splitter object has the specific event:

splitterMoved(int pos, int idx)

This event is triggered when the splitter handle at a particular index "idx" has been moved to the position "pos".

The handle is to the left of (or above) the item in the splitter's layout at the given index. The handle at index 0 is always hidden, therefore the index starts with 1.