Partager via


How to: Add Objects to a Custom Toolbar Class

After creating a custom toolbar class, you can add objects to it, including any objects supported by Visual FoxPro, except grids. For example, you can add objects from the Controls toolbar.

To add objects to your custom toolbar class

  1. Open the class library containing the custom toolbar class, and then open the class.

  2. On the Form Controls toolbar, choose an object you want to add.

  3. Place the object on the custom toolbar by selecting the custom toolbar.

  4. Repeat steps 2 and 3 until the custom toolbar is complete.

  5. Reorganize the objects on the custom toolbar, if appropriate.

    For example, you can size objects, move them by dragging them, delete them by pressing the DELETE key, or add extra space between them by inserting Separator objects from the Form Controls toolbar.

    Note

    You can move only one object at a time.

  6. Set properties of the toolbar in the Properties window.

  7. Save the custom toolbar class.

    Tip

    You can add a bitmap or icon to a toolbar button by setting its Picture Property (Visual FoxPro).

See Also

Tasks

How to: Define a Toolbar Class

How to: Add Custom Toolbars to Form Sets

Reference

Customize Toolbar Dialog Box (Visual FoxPro)

Other Resources

Creating Custom Toolbars

Designing Menus and Toolbars

Customizing the Visual FoxPro Environment