The problem is that the window is volatile, but when you enable overrideredirect , you lose any title or edge that you can grab to resize the window. The only solution is to resize. You can add your own borders or add mouse bindings that work when the mouse is near the edge.
This answer shows how to move such a window: Python / Tkinter: the mouse drags the window without borders, for example. overridedirect (1)
Here is a quick example illustrating resizing. It has hardly been tested on OSX, but should work on any platform. It uses python2, although it should work with python3 simply by modifying the import statements.
import Tkinter as tk import ttk class Example(tk.Tk): def __init__(self): tk.Tk.__init__(self) self.floater = FloatingWindow(self) class FloatingWindow(tk.Toplevel): def __init__(self, *args, **kwargs): tk.Toplevel.__init__(self, *args, **kwargs) self.overrideredirect(True) self.wm_geometry("400x400") self.label = tk.Label(self, text="Grab the lower-right corner to resize") self.label.pack(side="top", fill="both", expand=True) self.grip = ttk.Sizegrip(self) self.grip.place(relx=1.0, rely=1.0, anchor="se") self.grip.lift(self.label) self.grip.bind("<B1-Motion>", self.OnMotion) def OnMotion(self, event): x1 = self.winfo_pointerx() y1 = self.winfo_pointery() x0 = self.winfo_rootx() y0 = self.winfo_rooty() self.geometry("%sx%s" % ((x1-x0),(y1-y0))) return app=Example() app.mainloop()
source share