Added name attribute to CTkLabel

This commit is contained in:
octimot 2023-05-31 18:45:40 +02:00
parent d973d844ce
commit 8cc8dd3080
1 changed files with 3 additions and 1 deletions

View File

@ -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)