How To: Set Image property on a BarButtonCommand?

Bars for Windows Forms Forum

Posted 14 years ago by JohnH
Avatar
RE: UIStudio 2

Is there a recommended way to set the Image property on a BarButtonCommand object at design time?

I'm referring to the Image property shown on the Commands tab in the Customize dialog.


Steps To Get To This Point:
To create the command link on a toolbar for a given BarButtonCommand, I dropped the BarButtonCommand object from the menu, via the Customize dialog, on to an existing toolbar. This creates a corresponding BarButtonLink object. However, I don't see how to set the Image property on the new BarButtonLink object thru the design time UI. Other 'Standard Commands' have the image property already set to System.Drawing.Bitmap.

Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi John,

There are two places you can set images... one is on the command itself. Setting it on the command will cause any related link to have that same image which is generally what you want. You also can set the image on a link, which will override any command image setting. That image is specific to that link.

To set for a command, open the designer Customize dialog, go to the Commands tab, select the command in the ListBox, and in the PropertyGrid on the right, change its Image or ImageIndex property. You might have to scroll up to see them.

To set for a command link, open the designer Customize dialog, click on the link in a toolbar or menu, go back to the Customize dialog and select the Selected Command Link tab, then change its Image or ImageIndex property.


Actipro Software Support

The latest build of this product (v2020.1 build 0400) was released 7 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.