Dock Method

Applies To   See Also

Docks the ToolBar object along a border of the main Visual FoxPro window or along a side of the desktop.

Syntax

ToolBar.Dock(nLocation [, X, Y])

Arguments

nLocation

Specifies where the toolbar is docked. The values for nLocation are:

Value Constant Description
–1 TOOL_NOTDOCKED Undocks the toolbar.
0 TOOL_TOP Docks the toolbar at the top of the main Visual FoxPro window.
1 TOOL_LEFT Docks the toolbar at the left side of the main Visual FoxPro window.
2 TOOL_RIGHT Docks the toolbar at the right side of the main Visual FoxPro window.
3 TOOL_BOTTOM Docks the toolbar at the bottom of the main Visual FoxPro window.

X, Y

Specifies the horizontal and vertical coordinates respectively of the docked position of the toolbar.

Remarks

Toolbars are docked along the borders of the main window. When a toolbar is docked, its title bar is hidden and its border is changed to a single line. The toolbar is also resized to a single row of buttons. The window is resized so that the toolbar does not obscure any information on the screen. For example, if the toolbar is docked at the top, the screen is moved down by the height of the toolbar.

Use the Move method to undock a toolbar. When using the Move method, the coordinates specified must be outside the dock area.