Bitmap toggle button

Hi,

How do I make a bitmap toggle button? I tried making a toggle button
and then drawing onto it, but that didn’t work. Also, I tried a bitmap
button but that wouldn’t remain pressed like a toggle button.

Thanks for any help,

warrior

Ajithkumar Warrier wrote:

How do I make a bitmap toggle button? I tried making a toggle button
and then drawing onto it, but that didn’t work. Also, I tried a bitmap
button but that wouldn’t remain pressed like a toggle button.
There’s nothing in standard wxRuby and wxWidgets like that, apart from a
“toggle” tool in a Wx::ToolBar.

If you search for “wxBitmapButton bitmap” you’ll turn up references to
several wxWidgets C++ classes that do this. Maybe you could adapt the
code from one of those to Ruby.

alex

Ajithkumar Warrier wrote:

How do I make a bitmap toggle button? I tried making a toggle button
and then drawing onto it, but that didn’t work. Also, I tried a bitmap
button but that wouldn’t remain pressed like a toggle button.
Also, you might adapt from wxPython’s GenBitmapToggleButton. The python
code should be easier to translate into wxRuby.

http://svn.wxwidgets.org/svn/wx/wxPython/trunk/wx/lib/buttons.py

a

Thanks Alex,

wxPython’s GenBitmapToggleButton seems to rely heavily on the toggle
mixin, and it might require more digging in than I had originally
intended. I’ll try it later and keep posted.