Question

I want my frame to be always on top, but I want it to be really on top. I want no other windows to hide it, even if they are also "always on top". I'm using wx.STAY_ON_TOP and wx.FRAME_FLOAT_ON_PARENT, but still there are windows that appear on top of mine. Also, the taskbar appears on top of my frame, while I'd like it to be behind my frame.

I've tried a lot of things that didn't work, detailed here.

Any idea how to make my frame really on top?

Was it helpful?

Solution

Because their is no standard method in doing so, as it is most often an undesired effect, you can possibly achieve this by frequently setting the topmost flag again to "overrule" any other applications going for the topmost position. You could do this using a timer which sets the value every x ms, or you can try and only set the ontop flag again when the window has lost focus. The events to set the ontop flag are:

EVT_SET_FOCUS 
EVT_KILL_FOCUS 

OTHER TIPS

Try using this:

wx.Frame.SetFocus()
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top