From 8cc8dd30806900d06300019432b301aa13fb6db1 Mon Sep 17 00:00:00 2001 From: octimot Date: Wed, 31 May 2023 18:45:40 +0200 Subject: [PATCH] Added name attribute to CTkLabel --- customtkinter/windows/widgets/ctk_label.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/customtkinter/windows/widgets/ctk_label.py b/customtkinter/windows/widgets/ctk_label.py index 0eb7831..1203ea6 100644 --- a/customtkinter/windows/widgets/ctk_label.py +++ b/customtkinter/windows/widgets/ctk_label.py @@ -39,10 +39,12 @@ class CTkLabel(CTkBaseClass): compound: str = "center", anchor: str = "center", # label anchor: center, n, e, s, w wraplength: int = 0, + + name: Optional[str] = None, **kwargs): # transfer basic functionality (_bg_color, size, __appearance_mode, scaling) to CTkBaseClass - super().__init__(master=master, bg_color=bg_color, width=width, height=height) + super().__init__(master=master, bg_color=bg_color, width=width, height=height, name=name) # color self._fg_color = ThemeManager.theme["CTkLabel"]["fg_color"] if fg_color is None else self._check_color_type(fg_color, transparency=True)