How do I add an image to a toolbar button?

  • Thread starter Mac via DotNetMonster.com
  • Start date
M

Mac via DotNetMonster.com

Hi,

can anyone tell me how to add an image to a toolbar button? I would prefer
not doing it through code - I am hoping I can add it through the form
designer somwhow.

When I access the buttons collection for the toolbar, it would seem logical
to me that there is a property here to add an image to the button. But the
only thing close is image index, but I am unsure how it is implemented.

Can anyone assist?


Mac
 
C

Carlos J. Quintero [.NET MVP]

The Toolbar has an ImageList property. You must add an ImageList control to
the form, add some images to it, set the ImageList property value of the
Toolbar and then the image indexes of buttons refer to the indexes in the
bound imagelist...

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top