python - I can't change background color tabs on tkinter -


i have code:

ttk.style().configure("tnotebook", background="#1976d2",                       tabmargins=[2, 5, 2, 0]) ttk.style().map("tnotebook.tab", background=[("background", "red")],                 foreground=[("selected", "#ffffff")]) ttk.style().configure("tnotebook.tab", alternate="red", background="red",                       foreground="#757575", padding=[10, 10])  #######################  #################### notebook tabs_notebook = ttk.notebook(root, width=300, height=300, takefocus="true")  ##################### tab 1 tabs_notebook.add(guards_tab, text='guardias')    ####################### tab 2 services_tab = ttk.frame(tabs_notebook) tabs_notebook.add(services_tab, text='servicios')  # label.pack(side="top") tabs_notebook.pack(expand=true, fill=tk.both) self.button1 = tk.button(self.frame, text = 'new window', width = 25,                          command = self.new_window) self.button1.pack() colored_btn = ttk.button(root, text="test", style="c.tbutton").pack() self.frame.pack()` 

i have defined style on ttk, not working. tabs don't change have no idea why. then.. why not working this? , can instead of?


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -