Disabling Toolbarbutton

  • Thread starter Thread starter R.Balaji
  • Start date Start date
R

R.Balaji

Hi,

We are developing a windows application using c#.

We have created a toolbar with some toolbar buttons.

When we disable the toolbar button, the toolbar button image should be
displayed as a grey image.
But currently it blackout the image.
(eg. if I put a smiley icon, then when the toolbar is disabled it just
displays a grey cirlce.)

How do I solve this problem?

The toolbar button just have one property 'imageindex' to display the image.

Is there any property to display different image when this button is
disabled?

Any ideas?

Thanx.

Regards,
R.Balaji
 
Hi,

Got the answer...

Hi Balaji,

One other thing that has helped me to get a fairly good depiction of the
original image grayed out when a toolbar button is disabled is to set
TransparentColor property and
the ColorDepth property for the ImageList that holds the images for your
toolbar buttons.

You might like to try to ensure that the ImageList's TransparentColor
property is set to a color value that is the background for your images.

Also ensure that the ImageList's ColorDepth property reflects the actual
color depth of the images that you add to the image list. Also, ensure that
all the images in the imagelist are of the same color depth.

Please check to see if this helps in any way.

Regards,
Aravind C


Thank you Aravind.

Regards,
R.Balaji
 
Back
Top