Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i change kivy window position

Tags:

python

kivy

Is there any other way to change window position without using:

from kivy.config import Config
Config.set('graphics', 'position', 'custom')
Config.set('graphics', 'left', 100)
Config.set('graphics', 'top',  100)

I don't want to use this because when i change the last parameter (100) with my property it doesn't work.

like image 425
João Neto Avatar asked Feb 05 '23 07:02

João Neto


1 Answers

It's possible with the current master branch that has this change.

Update: It's possible with the current Kivy stable version → 1.10.0.

With that you can access the Window.top and Window.left properties and change Window position at runtime as well as get the actual position of the Window. Without that change (e.g. version 1.9.1), there's no way how to do that.

Also, Config is basically for a single change before the application actually runs e.g. set the position to [0, 0] and the Window will display at that position after App().run(). Nothing more really.

like image 110
Peter Badida Avatar answered Feb 08 '23 14:02

Peter Badida