Button with a bitmap and text

Stephen Emslie wrote:

Stephen Emslie wrote:

But perhaps this could be useful. Do you think it would be better to modify
the regular button to contain a bitmap and text, or to modify
GenBitmapTextButton to draw on the same type of square as a regular button?

Robin Dunn <robin <at> alldunn.com> writes:

Unfortunately making it look correct for every platform would probably be impossible. The easiest thing to do is to just make the text part of your image file, or dynamically create a new image that has the original image and the text drawn onto it.

If I make a regular wx.Button then surely that will take the appropriate form
for whatever platform it is on? I am fine with the button looking like a windows
button on windows, and the appropriate type of button for other OS's.

I have tried this, overriding wx.Button's paint event to draw the graphic and
the text and it works well. Do you think it will look appropriate on other
platforms?

No. You most likely will not get a paint event on wxGTK (buttons are not a true window) and on OSX you can't change the appearance of the native controls except in very small ways.

ยทยทยท

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