--------- Mensaje reenviado --------
> De: craf <[email protected]>
> Para: Python Tkinter Ingles <[email protected]>
> Asunto: [Tkinter-discuss] Change font and size in control ttk.Entry
> Fecha: Tue, 07 Dec 2010 16:44:20 -0300
>
> Hi.
>
> I'm trying to change the font type and size of a ttk.Entry control.
>
> Example:
>
> from tkinter import *
> from tkinter import ttk
>
>
> master=Tk()
> s = ttk.Style()
> s.theme_use('clam')
> s.configure('TEntry', font='Monaco')
>
> entrada = ttk.Entry(master, style='TEntry')
> entrada.pack()
>
> master.mainloop()
>
> Unfortunately does not work.
> Is there another way to do this?
>
> Thank you very much in advance.
>
> Regards.
>
> Cristian Abarzua.
>
> I USE: Python 3.1 - Tkinter 8.5 - Ubuntu 9.10
>
Hi.
I leave the answer for which you have the same problem:
from tkinter import *
from tkinter import ttk
master=Tk()
s = ttk.Style()
s.theme_use('clam')
entrada = ttk.Entry(master,font='TkDefaultFont 12' )
entrada.pack()
master.mainloop()
Regards.
CRAF
_______________________________________________
Tkinter-discuss mailing list
[email protected]
http://mail.python.org/mailman/listinfo/tkinter-discuss