--------- Mensaje reenviado -------- > De: craf <p...@vtr.net> > Para: Python Tkinter Ingles <tkinter-discuss@python.org> > 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 Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss