Assigning Images to Tool Buttons

From RAD Studio
Jump to: navigation, search

Go Up to Adding a Toolbar Using the Toolbar Component


Each tool button has an ImageIndex property that determines what image appears on it at run time. If you supply the tool button only one image, the button manipulates that image to indicate whether the button is disabled.

To assign images to tool buttons at design time

  1. Select the toolbar on which the buttons appear.
  2. In the Object Inspector, assign a TImageList object to the toolbar's Images property. An image list is a collection of same-sized icons or bitmaps.
  3. Select a tool button.
  4. In the Object Inspector, assign an integer to the tool button's ImageIndex property that corresponds to the image in the image list that you want to assign to the button.

You can also specify separate images to appear on the tool buttons when they are disabled and when they are under the mouse pointer. To do so, assign separate image lists to the toolbar's DisabledImages and HotImages properties.

See Also