Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set min and max resize sizes for my main window?

I have a gui window which I can resize. I want to set min resizing values (and max as well) so that my widgets would not be swallowed when making the window too small or app would not look ugly when resized too much.

enter image description here

How do I set min and max resize sizes for my main window?

like image 714
minerals Avatar asked Sep 05 '13 20:09

minerals


People also ask

How do I set a window size for Windows?

When you say, “How do I set a window size for Windows” which windows are you referring? We can change the window size, by changing options in the properties of the application. Refer the steps mentioned below: Right click on any application shortcut and select Properties.

How do I Change my display size in Windows 10?

Don't worry—Windows 10 has you covered! Just follow the steps in this wikiHow to change your display size. Open Settings . To do this, click on the start button and choose the settings gear. [1] Click Ease of Access. [2] It is the tenth option on the list. Click Display. [3] It is the first item under Vision . Adjust the slider.

How do I make everything bigger in Windows 10?

Open Settings . To do this, click on the start button and choose the settings gear. [6] Click Ease of Access. [7] It is the tenth option on the list. Click Display. [8] It is the first item under Vision . Click the dropdown under Make everything bigger. [9]

How to change the size of shortcuts in Windows 10?

Right click on any application shortcut and select Properties. Click on Shortcut tab. Now, use the drop down beside Run and select the size from Normal window, Minimized and Maximized.


1 Answers

You can use the minsize and maxsize functions:

from Tkinter import *

root = Tk()
root.minsize(width=200, height=200)
root.maxsize(width=650, height=500)
root.mainloop()
like image 138
sloth Avatar answered Sep 30 '22 18:09

sloth