How to hide/remove the default minimize/maximize buttons on window developed with Kivy?

删除回忆录丶 提交于 2020-02-04 05:01:08

问题


How I can remove or hide the default minimize or maximize button of a window created with kivy.


回答1:


I'm not aware of a simple way to do this - it's not exposed in the kivy window api, and may not even be exposed in pygame (which is likely the backend you're using on desktop).

Maybe you can look up the right way to do it on each system you target, e.g. I think you can hint it to X11, but I don't know if this is really plausible or nice.

We're developing a new sdl2 backend, which is more flexible about some of these kinds of things, but I don't know if it would make this possible.




回答2:


First option:

(Seen on https://github.com/kivy/kivy/issues/2616)

from kivy.config import Config
Config.set('graphics', 'borderless', 'True')

.....

Second option:

from kivy.core.window import Window
Window.bordeless = 'True'


来源:https://stackoverflow.com/questions/25639073/how-to-hide-remove-the-default-minimize-maximize-buttons-on-window-developed-wit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!