Menu

#2964 configure font not working properly

obsolete: 8.5.10
pending-invalid
5
2012-04-20
2012-04-20
LMO
No

TLabelframe does not list 'label' as a child, but TLabelframe.label does return a list of elements including -font. ttk.Style().configure('TLabelframe.label', font='fontname') does not change the font used, but using 'TLabelframe.Label' instead does work (note uppercase 'L').

For TButton which lists label as a child, TButton.label (or .Label) does not change the font, while TButton alone does.. TCheckbutton is the same.

For TEntry, I could not find any value that worked to change the font. I tried with and without .label/.Label, with .textarea/Textarea, and both in combination.

I am testing on OSX and Windows using Python 2.7.2, and Tcl/Tk 8.5.11.

Discussion

  • Joe English

    Joe English - 2012-04-20
    • status: open --> pending-invalid
     
  • Joe English

    Joe English - 2012-04-20

    The font for ttk::entry widgets must be set on the widget itself; this will override any font specified in the style database. Consequently it is not possible to change the font of a ttk::entry widget using the style database.

    Also: the label for ttk::labelframe widgets is controlled by the "Label" sublayout, not by the primary layout. This accounts for the difference wrt. ttk::labelframe vs ttk::button noted above.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.