mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
Added name attribute to CTkLabel
This commit is contained in:
parent
d973d844ce
commit
8cc8dd3080
@ -39,10 +39,12 @@ class CTkLabel(CTkBaseClass):
|
|||||||
compound: str = "center",
|
compound: str = "center",
|
||||||
anchor: str = "center", # label anchor: center, n, e, s, w
|
anchor: str = "center", # label anchor: center, n, e, s, w
|
||||||
wraplength: int = 0,
|
wraplength: int = 0,
|
||||||
|
|
||||||
|
name: Optional[str] = None,
|
||||||
**kwargs):
|
**kwargs):
|
||||||
|
|
||||||
# transfer basic functionality (_bg_color, size, __appearance_mode, scaling) to CTkBaseClass
|
# 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
|
# color
|
||||||
self._fg_color = ThemeManager.theme["CTkLabel"]["fg_color"] if fg_color is None else self._check_color_type(fg_color, transparency=True)
|
self._fg_color = ThemeManager.theme["CTkLabel"]["fg_color"] if fg_color is None else self._check_color_type(fg_color, transparency=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user