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 """

View File

@ -12,7 +12,7 @@ import os
setup(name="customtkinter",
version="3.10",
version="3.11",
author="Tom Schimansky",
license="Creative Commons Zero v1.0 Universal",
url="https://github.com/TomSchimansky/CustomTkinter",
@ -20,7 +20,7 @@ setup(name="customtkinter",
long_description_content_type="text/markdown",
long_description="# CustomTkinter UI-Library\n\nDetailed Information: https://github.com/TomSchimansky/CustomTkinter",
include_package_data=True,
packages=["customtkinter"],
packages=["customtkinter", "customtkinter.widgets"],
classifiers=["Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication"],