The Toolbar_ class is little more than a direct subclass of the Visual FoxPro Toolbar base class as you can see from the list of its properties and methods below. 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.
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 = “Toolbar_” |
|
|
ControlBox = .F. |
|
|
Name = “toolbar_” |
|
|
Custom Properties: |
|
|
cActiveFormName = “” |
The active form name is filled-in by the ShowNavToolbar method of the Application object when it instantiates the toolbar. It is used to make sure the form is active before any interaction between the toolbar and the form takes place. |
|
I_lOverrideCaption = .F. |
Used by the multilingual functionality to bypass the translation of the Caption property value. |
|
lFormToolbar = .F. |
Identifies whether or not the toolbar works in conjunction with a form. |
|
lRestoreWindowPos = .T. |
If .T., causes the toolbar to be positioned in its last recorded position (the RestoreWindowPos method is called). |
|
nDefaultDockPosition = 0 |
Identifies the default dock position for the toolbar (0 – top, 1 – left, 2 – right, 3 – bottom). |
|
nSeparatorStyle = 1 |
The value in this property gets placed in the Style property of all separators. The default is 1 – Vertical Rule. |
|
nSpecialEffect = 2 |
The value in this property gets placed in the SpecialEffect property of all controls. The default is 2 – Hot Tracking. |
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: |
|
|
DblClick |
Prevents the toolbar from undocking when double-clicked. |
|
Destroy |
Saves the toolbar’s position in the current user’s INI file (calls the SaveWindowPos method). Makes the toolbar disappear faster by changing the Visible property to .F.. |
|
Init |
Sets the SpecialEffect property of all controls and the Style property of the separators that are on the toolbar. Multilingual functionality translates the properties of the controls. Restores the toolbar’s position from the current user’s INI file (calls the RestoreWindowPos method). By default, docks the toolbar at the position specified in the nDefaultDockPosition property. |
|
Custom Methods: |
|
|
OKToSend |
Returns .T. if the active form uses this toolbar. |
|
RestoreWindowPos |
Restores the toolbar’s position from the current user’s INI file. |
|
SaveWindowPos |
Saves the position of the toolbar to the current user’s INI file. |