Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Config Set min and max value for window size Kivy

Is there a way to config.set the mininum size and maximun size for a kivy window. For example the following code allows to set the default value when executed and make it not-resizable:

Config.set('graphics','width',500)
Config.set('graphics','height',400)
Config.set('graphics', 'resizable', False)

What I'm looking for is to make it resizable but with a size-limit. I tried to search it on the API but I can't find it.

like image 344
Cesar Augusto Avatar asked Feb 15 '19 08:02

Cesar Augusto


1 Answers

For setting a minimum size for the window use this section of code:

from kivy.core.window import Window

Window.size = (500, 400)
Window.minimum_width, Window.minimum_height = Window.size
like image 141
Joseph Smith Avatar answered Oct 01 '22 21:10

Joseph Smith