show icon while toolbar button is disabled.

S

Saeed

I have added few buttons to toolbar. I am using VSTO 2005. These buttons have
icons which are added using .mask and .picture properties. If I disable the
button I am able to see greyed out button text, but the icon image is
replaced by greyed mask which is not looking good. Is there any way to show
my own light colored icon instead when the toolbar button is disabled?
 
K

Ken Slovak - [MVP - Outlook]

Usually the masking doesn't look bad if you supply a PNG image with
transparency set in the alpha layer of the image. However, you can get the
state of a button in a getImage() callback to supply the appropriate image
you want.

In a getEnabled() callback you'd store the states of each button you want to
handle that way and then check the states in the getImage() callback. Then
you know what image to supply.
 

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