Dockable Property

Determines whether a form can be docked. Read/write at design time and run time.

Form.Dockable [= nValue]

Return Value

  • nValue
    Specifies a value that determines whether a form can be docked.

    The following table lists the values for nValue.

    nValue Description

    0

    Form does not support docking. (Default)

    1

    Form supports docking and is dockable. The HalfHeightCaption property is set to True (.T).

    2

    Form supports docking but is not dockable. The HalfHeightCaption property is set to True (.T).

    Note

    Before setting Dockable to 1 or 2, the ScrollBars property must be 0 (None), the ShowWindow property must be 0 (In Screen), and Desktop must be False (.F.). The ScrollBars, ShowWindow, and Desktop properties are read-only during run time. For more information, see ScrollBars Property and ShowWindow Property.

Remarks

Applies To: Form Object

Forms that are part of a form set do not support docking.

If the Dockable property changes when a form is docked, the form is undocked automatically.

When the form supports docking, that is, Dockable is set to 1 or 2, you can interactively set the form as dockable using one of two methods:

  • On the Window menu, click Dockable.

-OR-

  • Right-click the form's title bar and click Dockable on the shortcut menu.

Performing either of these actions switches the setting of Dockable between 1 and 2.

When Dockable is set to a value greater than 0, Visual FoxPro sets the properties in the following table automatically and disregards changes made to these properties. Setting Dockable to 0 does not revert these properties to their previous values.

Property Setting Notes

AlwaysOnBottom Property

.F.

 

AlwaysOnTop Property

.F.

 

BorderStyle Property

3

 

Closable Property

.T.

 

Desktop Property

.F.

Read-only at run time.

Enabled Property (Visual FoxPro)

.T.

 

HalfHeightCaption Property

.T.

 

MaxButton Property

.F.

Used only when Dockable is set to 2.

MDIForm Property

.F.

 

MinButton Property

.F.

Used only when Dockable is set to 2.

Movable Property

.T.

 

ScrollBars Property

0.

Read-only at run time.

ShowWindow Property

0.

Read-only at run time.

TitleBar Property

1

 

Visible Property (Visual FoxPro)

.T.

 

WindowState Property (Visual FoxPro)

0

 

WindowType Property

0

 

When Dockable is set to a value greater than 0, Visual FoxPro disregards the following properties entirely:

When a form is docked, the following properties are read-only:

Example

The following example uses the CREATEOBJECT( ) function to create a form, sets the Dockable and Visible properties so that the form is dockable and visible, and uses the Dock method to dock the form to the left side of the main Visual FoxPro window.

omyForm = CREATEOBJECT("Form")
omyForm.Dockable = 1
omyForm.Visible = .T.
omyForm.Dock(1)

See Also

Tasks

How to: Dock Forms

Reference

Docked Property
DockPosition Property
AfterDock Event
BeforeDock Event
UnDock Event
Dock Method
GetDockState Method
ADOCKSTATE( ) Function

Other Resources

Properties (Visual FoxPro)