ButtonImage

Applies to

Menu objects

Description

Specifies the image for the button. The default width and height of the image for the small button is 16 * 16 pixels, and for the large button is 32 * 32 pixels.

If no image is specified, for the contemporary style menu, the MenuImage property of the menu item will be used, otherwise, the system default image will be displayed.

The following is the default image provided by the system.

Data type

String.

Usage

In a painter

To specify the image for the button:

  1. In the Menu painter, expand the menu in the treeview, and then select a sub-menu item (such as a 2nd-level, 3rd-level, or 4th-level menu item).

  2. Select the RibbonView tab page, and then input the file path or URL address of the image to the ButtonImage text box, or click the ellipsis button after the ButtonImage text box to select an image from the dialog box.

In scripts

This statement sets the image for the m_exit button to icon1.ico:

m_exit.ButtonImage = "icon1.ico"