[Tkinter-discuss] Font control in tkMessageBox?
Michael Lange
klappnase at web.de
Wed Apr 13 11:18:46 CEST 2005
On Tue, 12 Apr 2005 16:18:43 -0400
Marv Boyes <marvboyes at gmail.com> wrote:
> Hello, all. Sorry if this is so elementary that I should have been able
> to find it on my own; if it's out there, I must have missed it.
>
> I'm wondering if it's possible to specify font type and size in a
> tkMessageBox under Python 2.3 in Linux. Nothing I've tried has worked,
> and my messagebox text is simply coming out too big for what I want to do.
>
> Any guidance would be greatly appreicated; thanks very much in advance.
>
>
> Marv Boyes
Hi Marv,
you can specify an application-wide default font which will be used by tkMessageBox , too.
>>> from Tkinter import *
>>> import tkMessageBox
>>> r = Tk()
>>> r.option_add('*font', 'Helvetica -12')
>>> tkMessageBox.showinfo(message='Hello')
I hope this helps
Michael
More information about the Tkinter-discuss
mailing list