Tkinter, resizing, and widget clipping

D

Douglas Alan

Is there a way to tell Tkinter that I'd like to allow a window to be
resizable, but only down to the point where no widget clipping occurs?

I know that to get the effect I want, I can always (1) draw the window
without any geometry setting, (2) fetch the geometry of the drawn
window, (3) set the minimum window size to be this size, and then (4)
reset the geometry of the window to be the size that I'd really like
the window to start off as. It seem to me, though, that is something
of a slow and gross hack.

|>oug
 
D

Douglas Alan

Douglas Alan said:
Is there a way to tell Tkinter that I'd like to allow a window to be
resizable, but only down to the point where no widget clipping occurs?

To answer my own question, I think that the following does the job:

window.minsize(window.winfo_reqwidth(), window.winfo_reqheight())

|>oug
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top