tkMessageBox: Changing Fonts, Colors, etc.

Eric Brunel eric.brunel at pragmadev.com
Fri Nov 15 04:30:52 EST 2002


Tim Daneliuk wrote:

> I cannot seem to find a reference on how to change the font type, size,
> etc. and colors for one of the tkMessageBox critters like showinfo() or
> showwarning()
> 
> Could some kind soul, direct me to same, please?

AFAIK, you just can't. These message boxes are managed internally by Tk, 
sometimes by directly using API calls for the current platform (e.g. on 
Windows, where the message boxes are regular Windows ones, as can be seen 
in non-english versions of Windows: on a french version, a call to askyesno 
will show a dialog with buttons labelled "Oui" and "Non" ...).

If you're on Un*x, there are tcl scripts that actually implement the 
dialogs. You'll find them near the libtk<version>.so library, in the 
tk<version> directory. You may hack them to do want you want, but you still 
won't be able to customize them from your application...
-- 
- Eric Brunel <eric.brunel at pragmadev.com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com



More information about the Python-list mailing list