Reputation: 1609
Is there some possible way of setting kivy.Window
to be always on the top of other windows. I mean something similar to tkinter.Tk().attributes('-topmost', True)
. I have tried to set Window.on_hide = Window.raise_window
but with no success.
I need to do this really badly so please write any even complicated solution Any help will be highly appreciated.
EDIT:
I am on Windows 10, python 3.6.5
Upvotes: 2
Views: 3393
Reputation: 467
This question had already answered years ago, but I want to recommend you to use just Python library.
And I strongly recommends you KivyOnTop. This is very simple and works well.
You can active AlwaysOnTop mode with register_topmost(Window, TITLE)
.
Upvotes: 2
Reputation: 5949
You can probably use the win32 python modules (win32api, win32gui, winxpgui…) to get a window handle (e.g: win32gui.FindWindow(None, NAME)
) then set its properties to stick it on top, using win32gui.SetWindowPos should do the trick, here is the relevant documentation: https://msdn.microsoft.com/en-us/library/windows/desktop/ms633545(v=vs.85).aspx
Upvotes: 1
Reputation: 29450
Kivy doesn't have an API for this. It looks like SDL2, Kivy's main windowing backend, supports it only on X11, so if that's your platform you could add the functionality. There might be way to do it using a platform-specific method outside of Kivy itself, but I don't know about that.
Upvotes: 1