diff --git a/customtkinter/widgets/ctk_entry.py b/customtkinter/widgets/ctk_entry.py index 1fb5d21..9d9c15a 100644 --- a/customtkinter/widgets/ctk_entry.py +++ b/customtkinter/widgets/ctk_entry.py @@ -24,10 +24,12 @@ class CTkEntry(CTkBaseClass): **kwargs): # transfer basic functionality (bg_color, size, _appearance_mode, scaling) to CTkBaseClass - if "master" in kwargs: - super().__init__(*args, bg_color=bg_color, width=width, height=height, master=kwargs.pop("master")) - else: - super().__init__(*args, bg_color=bg_color, width=width, height=height) + super_kwargs = {} + if "master" in kwargs: + super_kwargs['master'] = kwargs.pop("master") + if "name" in kwargs: + super_kwargs['name'] = kwargs.pop("name") + super().__init__(*args, bg_color=bg_color, width=width, height=height,**super_kwargs) # configure grid system (1x1) self.grid_rowconfigure(0, weight=1) diff --git a/customtkinter/widgets/ctk_label.py b/customtkinter/widgets/ctk_label.py index c60699b..46c22bf 100644 --- a/customtkinter/widgets/ctk_label.py +++ b/customtkinter/widgets/ctk_label.py @@ -21,11 +21,12 @@ class CTkLabel(CTkBaseClass): **kwargs): # transfer basic functionality (bg_color, size, _appearance_mode, scaling) to CTkBaseClass - if "master" in kwargs: - super().__init__(*args, bg_color=bg_color, width=width, height=height, master=kwargs.pop("master")) - else: - super().__init__(*args, bg_color=bg_color, width=width, height=height) - + super_kwargs = {} + if "master" in kwargs: + super_kwargs['master'] = kwargs.pop("master") + if "name" in kwargs: + super_kwargs['name'] = kwargs.pop("name") + super().__init__(*args, bg_color=bg_color, width=width, height=height,**super_kwargs) # color self.fg_color = ThemeManager.theme["color"]["label"] if fg_color == "default_theme" else fg_color if self.fg_color is None: diff --git a/customtkinter/widgets/ctk_textbox.py b/customtkinter/widgets/ctk_textbox.py index 6dfedb2..dd29f21 100644 --- a/customtkinter/widgets/ctk_textbox.py +++ b/customtkinter/widgets/ctk_textbox.py @@ -20,10 +20,12 @@ class CTkTextbox(CTkBaseClass): **kwargs): # transfer basic functionality (bg_color, size, _appearance_mode, scaling) to CTkBaseClass - if "master" in kwargs: - super().__init__(*args, bg_color=bg_color, width=width, height=height, master=kwargs.pop("master")) - else: - super().__init__(*args, bg_color=bg_color, width=width, height=height) + super_kwargs = {} + if "master" in kwargs: + super_kwargs['master'] = kwargs.pop("master") + if "name" in kwargs: + super_kwargs['name'] = kwargs.pop("name") + super().__init__(*args, bg_color=bg_color, width=width, height=height,**super_kwargs) # color self.fg_color = ThemeManager.theme["color"]["entry"] if fg_color == "default_theme" else fg_color @@ -166,4 +168,4 @@ class CTkTextbox(CTkBaseClass): else: super().configure(require_redraw=require_redraw) - self.textbox.configure(**kwargs) + self.textbox.configure(**kwargs) \ No newline at end of file