Wednesday, 11 September 2013

Set style for Checkbutton or Labelframe in python tkinter

Set style for Checkbutton or Labelframe in python tkinter

I have designed a GUI using python tkinter. And now I want to set style
for Checkbutton and Labelframe, such as the font, the color .etc I have
read some answers on the topics of tkinter style, and I have used the
following method to set style for both Checkbutton and Labelframe. But
they don't actually work.
Root = tkinter.Tk()
ttk.Style().configure('Font.TLabelframe', font="15", foreground = "red")
LabelFrame = ttk.Labelframe(Root, text = "Test", style = "Font.TLabelframe")
LabelFrame .pack( anchor = "w", ipadx = 10, ipady = 5, padx = 10, pady =
0, side = "top")
Can you tell me the reasons, or do you have some other valid methods?
Thank you very much!

No comments:

Post a Comment