<<Show>>

if height>=Sheight: .geometry(f"{width}x{Sheight-3}+{left}+{1}")
if width>=Swidth: .geometry(f"{Swidth-3}x{height}+{1}+{top}")

--------------------------------------------------------------

https://stackoverflow.com/questions/53266705/scrollbar-in-frame-of-tkinterpython
https://stackoverflow.com/questions/3085696/adding-a-scrollbar-to-a-group-of-widgets-in-tkinter

parentframe = self.frame.winfo_parent()
textVsb = ttk.Scrollbar(parentframe, orient="vertical", command=self.frame.yview, style=f"{self.winfo_toplevel().color2}.Vertical.TScrollbar")
textHsb = ttk.Scrollbar(parentframe, orient="horizontal", command=self.frame.xview, style=f"{self.winfo_toplevel().color2}.Horizontal.TScrollbar")
self.frame.configure(yscrollcommand=lambda f, l: self.autoscroll(textVsb, f, l), xscrollcommand=lambda f, l:self.autoscroll(textHsb, f, l))
self.frame.grid(row=0, column=0, sticky="nsew")
textVsb.grid(row=0, column=1, sticky="ns")
textHsb.grid(row=1, column=0, sticky="ew")
parentframe.grid_rowconfigure(0, weight=1)
parentframe.grid_columnconfigure(0, weight=1)

	def autoscroll(self, sbar, first, last):
		first, last = float(first), float(last)
		if first <= 0 and last >= 1:
			sbar.grid_remove()
		else:
			sbar.grid()
		sbar.set(first, last)