tkMessageBox: Changing Fonts, Colors, etc.

Cameron Laird claird at lairds.com
Fri Nov 15 09:15:59 EST 2002


In article <ar2eb3$imp$1 at news-reader11.wanadoo.fr>,
Eric Brunel  <eric.brunel at pragmadev.com> wrote:
>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...
			.
			.
			.
Yes, to a first approximation.

There's actually more to it.  Tcl/Tk specialists have been
intending to write up the details, but none of us have got-
ten around to it, yet.  In the meantime, see <URL: http://
groups.google.com/groups?th=fb9c090fdba4799e > or <URL:
http://wiki.tcl.tk/messagebox >.
-- 

Cameron Laird <Cameron at Lairds.com>
Business:  http://www.Phaseit.net
Personal:  http://phaseit.net/claird/home.html



More information about the Python-list mailing list