ttk

Is there a Tkinter/ttk style reference?

谁都会走 提交于 2021-01-27 09:01:33
问题 With ttk one can produce code like the following: style.configure('TButton', font='helvetica 24',foreground='red', padding=10) Is there a list of the different options (e.g. font, foreground, padding) and the values (e.g. helvetica 24, red, 10) associated with each of them? I've been searching online and have yet to find such a reference. Also, is there a css-like thing we can use to style a TKinter GUI? Or is ttk my best bet? 回答1: Most information you should find in Tk Reference Manual. See

Customization of Tkinter ttk background style is not being shown

夙愿已清 提交于 2021-01-20 08:55:09
问题 In the following code, the show_widget_validity() function either applies a custom style that has just a change to the background color of a widget's existing style, or restores the original style. This is a library routine, so does not take complete control of the style. The background color appears to be reconfigured correctly, as shown by the background style description reported in the entry widget after each change. However, the actual background color of the widget does not change. This

Ttk Indeterminate progress bar on button press

孤街醉人 提交于 2021-01-07 02:39:46
问题 I am trying to create a progress bar that runs as long as my function is running to show the user that things are happening and not just frozen. My function (generate_reports) makes queries to the database and writes to CSV files. Here is an abstract version of my code: from tkinter import * from tkinter import ttk from billing import generate_reports class app: def __init__(self, root): self.mainframe = ttk.Frame(root, padding = '4 4 12 12') self.mainframe.grid(column = 0, row = 0, sticky =