allowDocking
Type: Integer
Availability: Read or write at any time
The allowDocking property of the Form, Frame, and JadeDockContainer classes controls the type of docking allowed by the window.
The value of the allowDocking property is a bit mask of the allowable docking types that are accepted by the window, and it is used when the user drags a JadeDockBar or JadeDockContainer control into a potential docking position within the Form, Frame, or JadeDockContainer control.
Docking is automatically rejected if the appropriate bit is not set within the value of the allowDocking property.
The allowDocking property allows any combinations of the Window class constants listed in the following table.
Window Class Constant | Value | Description |
---|---|---|
AllowDocking_None | 0 | No docking allowed |
AllowDocking_Top | #1 | Allow top docking |
AllowDocking_Bottom | #2 | Allow bottom docking |
AllowDocking_Left | #4 | Allow left docking |
AllowDocking_Right | #8 | Allow right docking |
AllowDocking_AllHorizontal | #10 | Allow all horizontal docking |
AllowDocking_AllVertical | #20 | Allow all vertical docking |
AllowDocking_Inside | #40 | Allow docking inside |
AllowDocking_All | #7f | All of the above |
AllowDocking_AnyEdge | #f | Allow top, bottom, left, and right docking |
The AllowDocking_Inside value, which means that the control is docked without any special alignment applying, is intended for use with a JadeDockContainer that has multiple JadeDockBar controls as children (for example, a toolbar that has several JadeDockBar controls, each holding a logical grouping of controls).
To simplify the setting of the allowDocking property during painting
-
Select a Form, Frame, or JadeDockContainer control on a form in the JADE Painter.
-
Click the allowDocking property on the Specific sheet of the Properties dialog.
-
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.
-
To specify the docking that you require for the control, clear all docking options by checking the None check box, set all docking options by checking the All check box, or specify individual options by checking or unchecking the values that you require or do not want to apply, respectively.
Although the allowDocking property indicates that a docking type is permitted, the queryDock event method is still called for the JadeDockBar or JadeDockContainer control. The queryDock event method passes the window into which the control will be docked and the type of docking as parameters and returns whether that type of docking is permitted (that is, true or false).
The default value of the allowDocking property for Form and Frame classes is AllowDocking_None (that is, only the None check box is checked when you access the Allow Docking Property Page dialog and a Form or Frame control has focus in the JADE Painter).
The default value for JadeDockContainer controls is AllowDocking_Inside (that is, only the Inside check box is checked when you access the dialog when a docking container has focus in the Painter).
For examples, see "Multiple Group Toolbar Example", "Multiple Group Toolbar on a Non-MDI Form Example", and "Using Align All with Multiple Panes", in the following subsections. For details about floating and docking container controls, see "Floating a Docking Control" and "Docking a Control", under the "JadeDockBase Class", earlier in this document.