ThemedGenBitmapTextButton, that's what I was searching for

Thanks for the wx.lib.buttons.ThemedGenBitmapTextButton, has it been added recently? I remember searching for something similar a few weeks ago.

Sample:

from wx.lib.buttons import ThemedGenBitmapTextButton as BitmapBtnTxt
bitmap = wx.ArtProvider_GetBitmap(wx.ART_FIND, wx.ART_BUTTON)
button = BitmapBtnTxt(pane, -1, bitmap, "Find")

Marco De Felice wrote:

Thanks for the wx.lib.buttons.ThemedGenBitmapTextButton, has it been added recently? I remember searching for something similar a few weeks ago.

Yes, it's a fairly recent addition.

···

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

Hi!!
For drawing text into images, I use the aggdraw module, with python 2.3 and wxPython2.6.
If we consider, for example, the Garamond TTF file on windows, we could find 3 files: normal, italic and general.
And if I open wx.FontDialog from python shell, I can write text also in Garamond Bold Italic style.

Now, the aggdraw module take the TrueType Font file path for load TTF Font file, and if this file doesn't exists, I have an IOException.
How can wxFontDialog ( or Microsoft Word, or Adobe Photoshop, etc ) write text in a style which doesn't exists on system??

Moreover, I do this test: from c:\windows\fonts I've uninstalled all Garamond TTF files, but Italic.
If I open Microsoft Word, I will see that I can choose Garamond font, but it writes italic on default!!!

Can someone help me?? please???

Thank's!!!

···

--
/\/\ariano Di Felice
Java PHP Python Ruby programmer
with MySQL, PostgreSql, SQLite and Oracle support
Linux Platform Developer
mariano.difelice@gmail.com
Tel. 0735 703735
Cell +39 339 6407211

Mariano Di Felice wrote:

Hi!!
For drawing text into images, I use the aggdraw module, with python 2.3 and wxPython2.6.
If we consider, for example, the Garamond TTF file on windows, we could find 3 files: normal, italic and general.
And if I open wx.FontDialog from python shell, I can write text also in Garamond Bold Italic style.

Now, the aggdraw module take the TrueType Font file path for load TTF Font file, and if this file doesn't exists, I have an IOException.
How can wxFontDialog ( or Microsoft Word, or Adobe Photoshop, etc ) write text in a style which doesn't exists on system??

It can't. What is probably happening is that the font file is not where you are looking for it, but someplace else.

Moreover, I do this test: from c:\windows\fonts I've uninstalled all Garamond TTF files, but Italic.
If I open Microsoft Word, I will see that I can choose Garamond font, but it writes italic on default!!!

This is normal. The dialog is showing the base name of the font, and since there is only one style available that is what font is used when you select the font no matter what you choose. If there is no normal typeface available for a font family then it certainly can't draw one anyway if you don't have bold/italic selected in the application.

···

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