ToggleButton with Bitmap?

Hi

Is there a widget, that combines the ToggleButton and the BitmapButton?
If I have to create my own widget, what is the better point of start -
ToggleButton or BitmapButton?

Btw. why are there so many button widgets? AFAICS at least the toggling
could be done with a parameter for the create-function or a function
"EnableToggle(bool)". It would be great to enable the toggle on the fly.
And than you could have the events BUTTON_UP and BUTTON_DOWN - no code
needed to detect to which state the button was changed. The ToggleButton
would act more like a Button than a CheckBox.
And it isn't clear to me, why I can't change the text of a button to a
bitmap and vice versa.
Just my thoughts.

cu boesi

···

--
Wenn de Lüch net waer un dr Neid #1671 : icq-intern
gäbs lauter glückliche Leid #73628288 : icq-extern
Uhne Lüch un Neid = ganz gewiß boesi111 : aim
wär uf dr Ard is Paradies i171 : reallife

Alexander 'boesi' Bösecke wrote:

Hi

Is there a widget, that combines the ToggleButton and the BitmapButton?
If I have to create my own widget, what is the better point of start -
ToggleButton or BitmapButton?

Wow, the Time Machine has been busy today. Take a look in the wx.lib.buttons module.

Btw. why are there so many button widgets?

Probably the main reason is that the different types of buttons use different native widgets on some platforms. Making them be separate wx classes greatly simplifies the code. On the other hand, on Windows the checkbox and radio button are both the same native widget (sorta) as the button, bitmap button, and toggle button. Would it make sense to have one wx class for all five of them? Nope.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!