BeforeDock Event

Applies To   See Also

Occurs before the ToolBar object is docked.

Syntax

PROCEDURE ToolBar.BeforeDock
LPARAMETERS [nIndex] , nLocation

Parameters

nIndex

Uniquely identifies a control if it is in a control array.

nLocation

Specifies where the ToolBar will be docked. The values for nLocation are:

Value FOXPRO.H Constant Description
–1 TOOL_NOTDOCKED ToolBar will be undocked.
0 TOOL_TOP ToolBar will be docked at the top of the main Visual FoxPro window.
1 TOOL_LEFT ToolBar will be docked at the left side of the main Visual FoxPro window.
2 TOOL_RIGHT ToolBar will be docked at the right side of the main Visual FoxPro window.
3 TOOL_BOTTOM ToolBar will be docked at the bottom of the main Visual FoxPro window.

Remarks

The BeforeDock event occurs when the ToolBar is dragged to a docking region or when the Dock method is invoked.

BeforeDock is triggered before the ToolBar is redrawn, so you can change the appearance of the toolbar. This is useful if the ToolBar has a control, such as a ComboBox, that you want to replace with a control of different proportions, such as a CommandButton, when the ToolBar is docked.