Partilhar via


Dock Method

Positions the ToolBar object along a border of the main Visual FoxPro window.

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

Parameters

  • nLocation
    Specifies where the toolbar is docked. The values for nLocation are:
    Value Constant Description
    –1 TOOL_NOTDOCKED Undocks the toolbar.
    0 TOOL_TOP Positions the toolbar at the top of the main Visual FoxPro window.
    1 TOOL_LEFT Positions the toolbar at the left side of the main Visual FoxPro window.
    2 TOOL_RIGHT Positions the toolbar at the right side of the main Visual FoxPro window.
    3 TOOL_BOTTOM Positions 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.

See Also

AfterDock Event | BeforeDock Event | Docked Property | Undock Event

Applies To: ToolBar