ttkwidgets

How to add different background colors to different selection options in ttk.Combobox?

How to add different background colors to different selection options in ttk.Combobox? Question: I want to add different colors to different selections in Combobox. I found questions about changing the overall background color, but not per entry. I’m attaching some examples below. Asked By: Mike Azatov || Source Answers: The Ttk Combobox does not supports …

Total answers: 1

How to create a subclass of ttk.Button correctly (class function doesnt work)?

How to create a subclass of ttk.Button correctly (class function doesnt work)? Question: I want to create Buttons with a text and define a function that prints me the text on the monitor when i press the button. Everything works well without classes: from tkinter import * from tkinter import ttk def PressButton(): print(FirstButton.cget(‘text’)) root …

Total answers: 1

How to add and remove individual tkk.Treeview tags using "addtag" and "dtag"?

How to add and remove individual tkk.Treeview tags using "addtag" and "dtag"? Question: I have been trying to add and remove individual tags from items in a ttk.Treeview (tkinter). I have seen references to addtag and dtag (dtag deletes specified tags leaving unspecified remaining) but the only examples I can find are related to canvas …

Total answers: 1

PYTHON – How to change data entry state to normal?

PYTHON – How to change data entry state to normal? Question: I can disable the calendar widget with the ‘Disable’ button, but if I want to reactivate it, I get the following error: tkinter.TclError: unknown option "-normal" If i try to use the calendar.config(state="normal") command, I get the following error: tkinter.TclError: unknown option "-state" import …

Total answers: 1

Tkinter – TTK – Button change state after click

Tkinter – TTK – Button change state after click Question: how can i change the state of a button made with TTK in Python after i clicked it ? I want to disable the button START after i press it once and re-enable it after pressing STOP. I want this because my code creates a …

Total answers: 1

Using ttk theme azure-dark and Changing background color of ttk combobox widget

Using ttk theme azure-dark and Changing background color of ttk combobox widget Question: I am using the ttk azure theme dark Azure-ttk-theme. It sets the background color to nice modern looking UI. However, as seen in the images the background color of the tk window, Text widget and combobox widget is set as same. This …

Total answers: 2