mirror of
				https://github.com/TomSchimansky/CustomTkinter.git
				synced 2023-08-10 21:13:13 +03:00 
			
		
		
		
	Added name attribute to CTkScrollableFrame
Fixed CTkLabel name attribute
This commit is contained in:
		| @@ -20,7 +20,7 @@ class CTkLabel(CTkBaseClass): | ||||
|  | ||||
|     # attributes that are passed to and managed by the tkinter entry only: | ||||
|     _valid_tk_label_attributes = {"cursor", "justify", "padx", "pady", | ||||
|                                   "textvariable", "state", "takefocus", "underline"} | ||||
|                                   "textvariable", "state", "takefocus", "underline", "name"} | ||||
|  | ||||
|     def __init__(self, | ||||
|                  master: any, | ||||
|   | ||||
| @@ -36,7 +36,8 @@ class CTkScrollableFrame(tkinter.Frame, CTkAppearanceModeBaseClass, CTkScalingBa | ||||
|                  label_text: str = "", | ||||
|                  label_font: Optional[Union[tuple, CTkFont]] = None, | ||||
|                  label_anchor: str = "center", | ||||
|                  orientation: Literal["vertical", "horizontal"] = "vertical"): | ||||
|                  orientation: Literal["vertical", "horizontal"] = "vertical", | ||||
|                  name: Optional[str] = None): | ||||
|  | ||||
|         self._orientation = orientation | ||||
|  | ||||
| @@ -45,7 +46,8 @@ class CTkScrollableFrame(tkinter.Frame, CTkAppearanceModeBaseClass, CTkScalingBa | ||||
|         self._desired_height = height | ||||
|  | ||||
|         self._parent_frame = CTkFrame(master=master, width=0, height=0, corner_radius=corner_radius, | ||||
|                                       border_width=border_width, bg_color=bg_color, fg_color=fg_color, border_color=border_color) | ||||
|                                       border_width=border_width, bg_color=bg_color, fg_color=fg_color, | ||||
|                                       border_color=border_color, name=name) | ||||
|         self._parent_canvas = tkinter.Canvas(master=self._parent_frame, highlightthickness=0) | ||||
|         self._set_scroll_increments() | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 octimot
					octimot