Overview

Visual FoxPro provides a toolbar base class from which you can create custom toolbars. To create a custom toolbar, you must first create a class for it. Then, at the appropriate point in your application, you create and display a toolbar object from the class.

Toolbar_

The VPM Enterprise Toolbar_ class is a subclass of the Visual FoxPro Toolbar base class. As you will see when you view the properties and methods of the Toolbar_ class in the next section, the Toolbar_ class does not add any significant functionality to the Visual FoxPro Toolbar base class. The main purpose of the Toolbar_ class is to establish a VPM Enterprise base class from which other VPM Enterprise toolbar classes can be created.

Because Visual FoxPro base classes cannot be modified, it is good practice to create your own base classes from the Visual FoxPro base classes. Then, you create all your subclasses from your own base classes. If you do that, you will have the ability to modify your base classes as needed, and your modifications will be inherited by your subclasses.

Toolbar_All

The VPM Enterprise Toolbar_All class is the blueprint for the Standard Form Toolbar used by forms based on the Form_Toolbar class. You’ll learn much more about this class in the Toolbar_All section of this chapter below.

Once a Form Toolbar object has been instantiated from this class, its properties and methods can be referenced or called using the _SCREEN.oApp.oToolbar object reference.

Note: We gave this class name the suffix “All” because it contains all of the VPM Enterprise toolbar buttons. In later versions, we may create toolbar classes that are subsets of the Toolbar_All class. If we do, the suffix will help identify the buttons the toolbar contains.

The VPM Enterprise-level toolbar classes are located in the VPMFORMS.VCX class library. The project-level toolbar classes are located in the PROFORMS.VCX class library.

Toolbar_All_Edit

The VPM Enterprise Toolbar_All_Edit class is the blueprint for the Standard Form Toolbar that includes an Edit button. You’ll learn much more about this class in the Toolbar_All_Edit section of this chapter below.

Once a Form Toolbar object has been instantiated from this class, its properties and methods can be referenced or called using the _SCREEN.oApp.oToolbar object reference.

The VPM Enterprise-level toolbar classes are located in the VPMFORMS.VCX class library. The project-level toolbar classes are located in the PROFORMS.VCX class library.

Toolbar_App

The VPM Enterprise Toolbar_App class is the blueprint for the Application Toolbar that is created upon application startup. You’ll learn much more about this class in the Toolbar_App section of this chapter below.

Once the Application Toolbar object has been instantiated from this class, its properties and methods can be referenced or called using the _SCREEN.oApp.oAppToolbar object reference.

The VPM Enterprise-level Application Toolbar class is located in the VPMAPP.VCX class library. The project-level Application Toolbar class is located in the PROAPP.VCX class library.

Toolbar_Startup

The VPM Enterprise Toolbar_Startup class is the blueprint for the Startup Toolbar that is created upon application startup. You’ll learn much more about this class in the Toolbar_Startup section of this chapter below.

Once the Startup Toolbar object has been instantiated from this class, its properties and methods can be referenced or called using the _SCREEN.oApp.oStartupToolbar object reference.

The VPM Enterprise-level Startup Toolbar class is located in the VPMAPP.VCX class library. The project-level Startup Toolbar class is located in the PROAPP.VCX class library.

Class Browser

If you want to thoroughly explore a toolbar class, open the class library in the Class Browser, which you can run from the VPM Enterprise Tools menu. Select the class name in the class list. Click on the Class Browser’s View Class Code button to have the Class Browser export the class code to a Window. Then, print the class code. As you view the class code, properties will appear like memory variables and methods will appear as procedures.

Toolbar Classes Properties and Methods

The remaining sections of this chapter describe the functionality, properties and methods of the VPM Enterprise toolbar classes.

More:

Toolbar_ Class