Share via


How to: Dock Toolbars

In Visual FoxPro, you can dock system or user-defined toolbars only to the main Visual FoxPro window. As with Visual FoxPro IDE windows, toolbars always take precedence when being docked closer to a border.

Toolbars do not support linked or tabbed docking. You cannot dock other windows to toolbars. Toolbars can never be docked inside a window and never share the same docking area with a form.

To dock a toolbar

  • Drag the toolbar to the top of the main Visual FoxPro window.

    The toolbar repositions itself against the chosen boundary.

    -OR-

  • Call the DOCK command with the appropriate values.

    -OR-

  • Use the toolbar's Dock method.

For more information, see DOCK Command and Dock Method.

To undock a toolbar

  1. Move the mouse pointer over the left side of the toolbar until the pointer changes into a mover arrow.

  2. Drag the toolbar away from the main Visual FoxPro window.

  3. -OR-

  4. Call the DOCK command with the appropriate values.

    You can also use the toolbar's Dock method or Move method. When using the Move method, the coordinates you specify must be outside the dock area.

For more information, see Move Method (Visual FoxPro).

When a toolbar is docked along the border of the main Visual FoxPro window, its title bar is hidden, and its border changes to a single line. The toolbar also resizes to a single row of buttons. The window resizes so that the toolbar does not obscure any information on the screen. For example, if the toolbar is docked at the top, the screen moves down by the height of the toolbar.

For more information about docking state and writing code for docking events, see Docking Forms.

See Also

Tasks

How to: Define Toolbar Actions

Other Resources

Creating Custom Toolbars

Visual FoxPro Environment Settings