Toolbar_Startup Class

The Toolbar_Startup class is the blueprint for the standard VPM Enterprise Startup Toolbar. It is a subclass of the Toolbar_ class.

Creating and Displaying the Startup Toolbar

When the application is run, here’s how the VPM Enterprise Startup Toolbar is created and displayed:

·       The application’s main program calls the Start method of the application object (_SCREEN.oApp).

·       The Start method runs the InstantiateStartupToolbar method.

·       The InstantiateStartupToolbar method checks for entries in the cStartupToolbar and cStartupToolbar_ClassLibrary properties. The cStartupToolbar and cStartupToolbar_ClassLibrary properties identify the toolbar class that will be used to create the startup toolbar. The name of the toolbar class is, of course, normally Toolbar_Startup.

Tip: If you want to use a different toolbar, store the name of the class and class library from which the toolbar should be created in the cStartupToolbar and cStartupToolbar_ClassLibrary properties. If you do not want to use a Startup Toolbar, simply blank-out the cStartupToolbar property.

·       The InstantiateStartupToolbar method instantiates the toolbar object from the Toolbar_Startup class. The code looks like this:

·       This.oStartupToolbar = CREATEOBJECT(This.cStartupToolbar)

·       The InstantiateStartupToolbar method then displays the toolbar object with this line of code, which calls the Show method of the toolbar object:

·       This.oStartupToolbar.Show()

Properties

The following table lists the class properties. The properties listed include the standard Visual FoxPro class properties that the VPM Enterprise class uses and the VPM Enterprise custom properties. Where appropriate, the Comments column of the table describes a property and provides suggestions for its use.

Property & Initial Value

Comments

Standard Properties Used:

 

Caption = “Startup Toolbar”

 

Custom Properties:

 

ControlBox = .T.

Allows the toolbar to be closed.

lRestoreWindowPos = .F.

Causes the toolbar to always come up in the same position, docked in the position specified in the nDefaultDockPosition.

nDefaultDockPosition = 1

Causes the toolbar to be docked on the left side of the application window.

Methods

The following table lists the class methods. The methods listed include the standard Visual FoxPro class methods that the VPM Enterprise class uses and the VPM Enterprise custom methods. Where appropriate, the Comments column of the table describes a method and provides suggestions for its use.

Method

Comments

Standard Methods Used:

None

Custom Methods:

None

More:

Control Classes