JavaScript Editor js editor     Web development 



Main Page

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.

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

See Also



JavaScript Editor js editor     Web development