Allowing Control Docking

You can use control docking on your forms if you want to allow users to drag a docking control (and all of its children) to a new position on the form or to cause that control to float in an independent floating window.

The changes required to implement docking controls enable you to have multiple status lines, multiple frames aligned to the top or bottom of the form, to align all controls that use the space remaining on the parent, and to align all multiple controls in the same parent so that they share the space remaining after other siblings have been aligned.

To specify that a form, frame, or docking container control allows docking within it

  1. Select a Form, Frame, or JadeDockContainer control on the form.

  2. Click the Specific icon on the Properties dialog. The Specific sheet of the Properties dialog is then displayed. (For details, see "Maintaining Properties for Your Form or Control" and "Maintaining Specific Control Properties", later in this chapter.)

  3. Select the allowDocking property and then select the Change value from the drop-down list in the right column of the allowDocking property row. The Allow Docking Property Page dialog, shown in the following image, is then displayed.

  4. To specify the docking that you require for the control, perform one of the following actions.

    • Clear all docking options by checking the None check box

    • Set all docking options by checking the All check box

    • Specify individual options by checking or unchecking the values that you require or do not want to apply, respectively

The default value of the allowDocking property for Form and Frame classes is None (that is, the None check box is checked when you access the Allow Docking Property Page dialog and a Form or Frame control has focus).

The default value for JadeDockContainer controls is Inside (that is, only the Inside check box is checked when you access the dialog when a docking container has focus in the Painter). The Inside value means that the control is docked without any special alignment applying, and is intended for use with a JadeDockContainer control that has multiple JadeDockBar controls as children (for example, a toolbar that has several JadeDockBar controls, each holding a logical grouping of controls).

For docking examples and details about floating and docking controls, see the JadeDockBar, JadeDockBase, and JadeDockContainer classes, in Chapter 2 of the JADE Encyclopaedia of Classes.