Search code examples
pythonwindowkivyalways-on-top

"Always on top" window in Kivy


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


Solution

  • 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