I am trying to customize a ttk.Scale using a ttk.Style. I don't really know, how to apply my Style to my Scale. Right now I am using this:
style = ttk.Style()
style.configure(".", background="#505050")
scale = ttk.Scale(self.root, from_ = 100, to = 0, orient=tk.VERTICAL)
This works just fine, but I don't really understand, whats going on with the "." .
I also tried something like this:
style = ttk.Style()
style.configure("myStyle", background="#505050")
scale = ttk.Scale(self.root, from_ = 100, to = 0, orient=tk.VERTICAL, style="myStyle")
But I am getting this error:
Layout Vertical.myStyle.TScale not found
This seems to work for buttons for example, but apparently not for scales:
style = ttk.Style()
style.configure("myStyle", background="#505050")
scale = ttk.Scale(self.root, from_ = 100, to = 0, orient=tk.VERTICAL, style="myStyle.TScale")
But I am also getting the same error.
All in all I am pretty confused on how to handle ttk.Style with ttk.Scale.
How do I apply a ttk.Style to a ttk.Scale the right way?