Freigeben über


Specifying Design-Time Appearance for a Class

You can specify the toolbar icon and the container icon for your class in the Class Info dialog box.

To set a toolbar icon for a class

  1. In the Class Designer, choose Class Info from the Class menu.

  2. In the Class Info dialog box, type the name and path of the .bmp file in the Toolbar icon box.

    Tip   The bitmap (.bmp file) for the toolbar icon is 15 by 16 pixels. If the picture is larger or smaller, it is sized to 15 by 16 pixels and might not look the way you want it to.

The toolbar icon you specify is displayed in the Form Controls toolbar when you populate the toolbar with the classes in your class library.

You can also specify the icon to be displayed for the class in the Project Manager and Class Browser by setting the container icon.

To set a container icon for a class

  1. In the Class Designer, choose Class Info from the Class menu.
  2. In the Container icon box, type the name and path of the .bmp file to be displayed on the button in the Form Controls toolbar.

See Also

Object-Oriented Programming | Classes and Objects: The Building Blocks of Applications | Classes in Visual FoxPro | Preparation for Class Creation | Creating Classes | Modifying a Class Definition | Subclassing a Class Definition | Operating the Class Designer | Class Member Protection and Hiding | Creating, Copying, and Removing Class Library Files | Adding Classes to Forms | Default Property Setting Override | Container Hierarchy Object Referencing | Setting Properties | Calling Methods | Event Response