From 79d5da439bc54e267732c0d58ea50be82ddc13e0 Mon Sep 17 00:00:00 2001 From: Tom Schimansky Date: Tue, 10 Jan 2023 15:03:45 +0100 Subject: [PATCH] fix readonly background for combobox #983 --- customtkinter/windows/widgets/ctk_combobox.py | 1 + examples/simple_example.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/customtkinter/windows/widgets/ctk_combobox.py b/customtkinter/windows/widgets/ctk_combobox.py index 6c69d7b..aa95337 100644 --- a/customtkinter/windows/widgets/ctk_combobox.py +++ b/customtkinter/windows/widgets/ctk_combobox.py @@ -201,6 +201,7 @@ class CTkComboBox(CTkBaseClass): self._entry.configure(bg=self._apply_appearance_mode(self._fg_color), fg=self._apply_appearance_mode(self._text_color), + readonlybackground=self._apply_appearance_mode(self._fg_color), disabledbackground=self._apply_appearance_mode(self._fg_color), disabledforeground=self._apply_appearance_mode(self._text_color_disabled), highlightcolor=self._apply_appearance_mode(self._fg_color), diff --git a/examples/simple_example.py b/examples/simple_example.py index 26d900f..49d1529 100644 --- a/examples/simple_example.py +++ b/examples/simple_example.py @@ -42,7 +42,7 @@ optionmenu_1.set("CTkOptionMenu") combobox_1 = customtkinter.CTkComboBox(frame_1, values=["Option 1", "Option 2", "Option 42 long long long..."]) combobox_1.pack(pady=10, padx=10) -optionmenu_1.set("CTkComboBox") +combobox_1.set("CTkComboBox") checkbox_1 = customtkinter.CTkCheckBox(master=frame_1) checkbox_1.pack(pady=10, padx=10)