removed self.canvas from winfo_children of CTkFrame

This commit is contained in:
Tom Schimansky
2022-04-13 16:02:10 +02:00
parent efbfd8a7f6
commit a062525a00
3 changed files with 14 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
__version__ = "3.10"
__version__ = "3.11"
from .widgets.customtkinter_input_dialog import CTkInputDialog
from .widgets.customtkinter_button import CTkButton

View File

@@ -94,6 +94,17 @@ class CTkFrame(tkinter.Frame):
AppearanceModeTracker.remove(self.change_appearance_mode)
super().destroy()
def winfo_children(self):
""" winfo_children of CTkFrame without self.canvas widget,
because it's not a child but part of the CTkFrame itself """
child_widgets = super().winfo_children()
try:
child_widgets.remove(self.canvas)
return child_widgets
except ValueError:
return child_widgets
def detect_color_of_master(self):
""" detect color of self.master widget to set correct bg_color """