Keep the window always at the bottom

I started learning wxPython today, and I was wondering if there was an alternative wx.STAY_ON_TOP. What I'm looking for is a window that will always be below. Unfortunately, there is no window style wx.STAY_ON_BOTTOM.

Basically, I want other windows (which I don't own) to always be in my place, even if it has focus. (Think of widgets on your desktop).

I tried to use Lower()windows to this focus to no avail.

Any suggestions?

+3
source share
1 answer

According to this article , the events wx.EVT_SET_FOCUSand wx.EVT_KILL_FOCUSthat I expect from you are attached, do not start on the panel or frame, which contains widgets that themselves take focus.

wx.EVT_ACTIVATE , , . event, , .

, :

import wx


class MyFrame(wx.Frame):
    def __init__(self, *args, **kwargs):
        super(MyFrame, self).__init__(*args, **kwargs)
        self.Bind(wx.EVT_ACTIVATE, self.on_focus)

    def on_focus(self, evt):
        self.Lower()


if __name__ == '__main__':
    app = wx.App(False)
    main_window = MyFrame(None)
    main_window.Show()
    app.MainLoop()

, , wx.EVT_ACTIVATE , - , . , ( ), , . , , , , .

-1

All Articles