# Bitmaps for disabled Toolbar buttons

**URL:** <https://www.ruby-forum.com/t/bitmaps-for-disabled-toolbar-buttons/178044>\
**Category:** wxRuby\
**Created:** [October 28, 2009, 2:14pm UTC](https://www.ruby-forum.com/t/bitmaps-for-disabled-toolbar-buttons/178044 "2009-10-28T14:14:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![el-gato](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/e0b2c6/32.png) [@el-gato](https://www.ruby-forum.com/u/el-gato)\
**Post date:** [October 28, 2009, 2:14pm UTC](https://www.ruby-forum.com/t/bitmaps-for-disabled-toolbar-buttons/178044/1 "2009-10-28T14:14:13Z")

</div>

I have a tool bar with some custom icons (png images). I have both  
enabled and disabled icon versions. Each toolbar item was added in this  
way:

tb.add\_tool(ID\_ADD, ‘add’, add\_bmp, add\_d\_bmp, Wx::ITEM\_NORMAL, ‘Add  
Item’, ‘’)

When I launch the app, the icons which have been disabled via:

get\_tool\_bar.enable\_tool(ID\_ADD, false)

show black backgrounds instead of the normal transparency present in the  
active icons. The disabled versions of the icons have a transparency  
mask and are just re-colored versions of the active version. In fact,  
even if I use the active icon for the disabled version, it still shows a  
black rectangle as the background.

Thoughts? Thanks!

---

<div class="post-metadata">

**Author:** ![el-gato](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/e0b2c6/32.png) [@el-gato](https://www.ruby-forum.com/u/el-gato)\
**Post date:** [November 5, 2009, 6:50pm UTC](https://www.ruby-forum.com/t/bitmaps-for-disabled-toolbar-buttons/178044/2 "2009-11-05T18:50:18Z")

</div>

Hi,

2009/10/28 El Gato [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> show black backgrounds instead of the normal transparency present in the  
> active icons.

Do you use Windows XP ?  
If it is the case, see the installation notes regarding Windows XP  
([http://wxruby.rubyforge.org/wiki/wiki.pl?Installation](http://wxruby.rubyforge.org/wiki/wiki.pl?Installation)) or read  
directly the following post :  
[Ruby on Windows: Windows XP Visual Style Controls with wxRuby](http://rubyonwindows.blogspot.com/2007/10/windows-xp-visual-style-controls-with.html)

Cheers.  
Chauk-Mean.

---

<div class="post-metadata">

**Author:** ![el-gato](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/e0b2c6/32.png) [@el-gato](https://www.ruby-forum.com/u/el-gato)\
**Post date:** [November 5, 2009, 7:39pm UTC](https://www.ruby-forum.com/t/bitmaps-for-disabled-toolbar-buttons/178044/3 "2009-11-05T19:39:35Z")

</div>

Chauk-Mean P. wrote:

> Hi,
> 
> 2009/10/28 El Gato [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> 
> > show black backgrounds instead of the normal transparency present in the  
> > active icons.
> 
> Do you use Windows XP ?  
> If it is the case, see the installation notes regarding Windows XP  
> ([http://wxruby.rubyforge.org/wiki/wiki.pl?Installation](http://wxruby.rubyforge.org/wiki/wiki.pl?Installation)) or read  
> directly the following post :  
> [Ruby on Windows: Windows XP Visual Style Controls with wxRuby](http://rubyonwindows.blogspot.com/2007/10/windows-xp-visual-style-controls-with.html)
> 
> Cheers.  
> Chauk-Mean.

Perfect! Thanks so much!
