How to Dock a Toolbar that Is Part of a FormsetLast reviewed: November 16, 1995Article ID: Q139568 |
The information in this article applies to:
SUMMARYUsing the Dock method of the ToolBar class, you can cause the toolbar to dock automatically when the formset is displayed.
MORE INFORMATIONTo have a toolbar that was added to your formset automatically dock when the formset is run, place code in the Init event of the toolbar to call the Dock method to dock the toolbar. Either of the following commands can be placed in the Init event of the toolbar to force the toolbar to dock at the top of the screen:
This.Dock(0) -or- ThisFormSet.<name property of toolbar object>.Dock(0)You can also dock the toolbar to the left, right, top, bottom, or a set of coordinates by using a different number or set of numbers. To undock the toolbar, use the -1 parameter, as in this example:
This.Dock(-1)For information on how to add a toolbar to your form or formset, please refer to page 345 of the "Microsoft Visual FoxPro Developer's Guide," in the "Adding Custom Toolbars to Form Sets" section. You can also drag a toolbar that you have created from your project's Classes tab to the form. If the form is not a formset, a dialog box will appear that asks:
A formset object is required to add a form. Create one?Clicking Yes will create the necessary formset, and you will have a form with a toolbar.
Syntax of the Dock MethodToolBar.Dock [nLocation [, X, Y]] nLocation - Specifies where the ToolBar is docked. The values for nLocation are: Value Constant Description
For example, if the toolbar is docked at the top, the screen is moved down by the height of the toolbar. Use the Move method to undock a toolbar. When using the Move method, specify coordinates that lie outside the dock area.
|
Additional reference words: 3.00 VFoxWin tool bar
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |