Hi John, On Tue, 27 Nov 2012 22:30:16 -0700 (MST) "John W. Shipman" <j...@nmt.edu> wrote:
> Below my signature is a trivial ttk script with two widgets: an > Entry and a quit button. Styling the font on the quit button > works great. But styling the font on the Entry widget does not; > I always get the default font, which is a bit small for many > people over the age of 40. > > I've tried a number of things, but either I'm missing something > really stupid in my code, or there is a defect in the ttk.Entry > code that it does not pick up a font. > > Here's our version: > > >>> tk.__version__ > '$Revision: 81008 $' > >>> ttk.__version__ > '0.3.1' here (debian squeeze) it is the same, however if I change your example a little into: self._entry = ttk.Entry(self, font=('helvetica', '30'), textvariable=self._entryVar) self._entry.grid() the requested font is actually used. I guess this is a bug in man ttk_entry, which does not mention the font configuration option. Now when I try: print(self._entryStyle.configure('TEntry')) the result is {'padding': 1, 'relief': 'sunken', 'fieldbackground': 'white'} whereas print(self._entry.cget('font')) returns TkTextFont So apparently the default entry style does not define a font at all, but the ttk entry uses a standard tk font instead and ignores fonts defined in styles. Regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. "That unit is a woman." "A mass of conflicting impulses." -- Spock and Nomad, "The Changeling", stardate 3541.9 _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss