Configuring Visual FoxPro Toolbars
Visual FoxPro includes the following customizable toolbars.
Tool | Associated Toolbars | Command |
---|---|---|
Database Designer | Database | CREATE DATABASE |
Form Designer | Form Controls
Form Designer Color Palette Layout |
CREATE FORM |
Print Preview | Print Preview | |
Query Designer | Query Designer | CREATE QUERY |
Report Designer | Report Controls
Report Designer Color Palette Layout |
CREATE REPORT |
Activating and Deactivating Toolbars
By default, only the Standard toolbar is visible. When you use a Visual FoxPro designer tool (for example, the Form Designer), the designer displays the toolbars that you commonly need when working with that designer tool. However, you can activate a toolbar any time you require it.
To activate a toolbar
Run the associated tool.
– or –
- From the View menu, select Toolbars.
- In the Toolbars dialog box, select the toolbar you want to activate.
- Choose OK.
To deactivate a toolbar
Close the associated tool.
– or –
- From the View menu, select Toolbars.
- In the Toolbars dialog box, clear the toolbar you want to deactivate.
You can also programmatically deactivate and activate toolbars that have been previously activated by using the DEACTIVATE WINDOW or ACTIVATE WINDOW commands as in the following example.
IF WVISIBLE ("Color Palette")
DEACTIVATE WINDOW("Color Palette")
ENDIF
You can place as many toolbars on your screen as you need while working. You can dock toolbars to the top, bottom, or sides of your screen to customize your working environment. Visual FoxPro saves the positions of the toolbars so they remain where you last placed them.
To dock a toolbar
- Drag the toolbar to the top, bottom, or side of your screen.
Customizing Existing Toolbars
The easiest way to create custom toolbars is by modifying the toolbars already provided with Visual FoxPro. You can:
- Modify an existing toolbar by adding or removing buttons.
- Create a new toolbar that contains buttons from existing toolbars.
You can also define custom toolbars by creating a custom toolbar class using code. For details, see Designing Menus and Toolbars.
Modifying an Existing Visual FoxPro Toolbar
You can modify any of the toolbars provided with Visual FoxPro. For example, you might want to remove a button from an existing toolbar, or copy buttons from one toolbar to another.
To modify a Visual FoxPro toolbar
From the View menu, choose Toolbars.
Select the toolbar you want to customize and choose Customize.
Remove buttons from the toolbar by dragging them off of the toolbar.
Add buttons to the toolbar by selecting an appropriate category in the Customize Toolbar dialog box and then dragging the appropriate buttons onto the toolbar.
Complete the toolbar by choosing Close in the Customize Toolbar dialog box and then closing the toolbar window.
Tip If you change a Visual FoxPro toolbar, you can restore it to its original configuration of buttons by selecting the toolbar in the Toolbar dialog box and then choosing Reset.
Creating a New Toolbar from Existing Toolbars
You can create your own toolbars comprised of buttons from other toolbars.
To create your own toolbar
From the View menu, choose Toolbars.
Choose New.
In the New Toolbar dialog box, name the toolbar.
Add buttons to the toolbar by selecting a category in the Customize Toolbar dialog box and then dragging the appropriate buttons onto the toolbar.
You can rearrange buttons on the toolbar by dragging them to the desired position.
Complete the toolbar by choosing Close in the Customize Toolbar dialog box and then closing the toolbar window.
**Note **You cannot reset buttons on a toolbar you create.
To delete a toolbar you created
From the View menu, choose Toolbars.
Select the toolbar you want to delete.
Choose Delete.
Choose OK to confirm the deletion.
Note You cannot delete toolbars provided by Visual FoxPro.
See Also
Using Command-Line Options When Starting Visual FoxPro | Setting Editor Options | Customizing the Visual FoxPro Environment | Designing Menus and Toolbars