wxPython:将框架置于一切之上 [英] wxPython: Making a frame be on top of everything

查看:99
本文介绍了wxPython:将框架置于一切之上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望框架始终位于最上方,但我希望框架确实位于最上方.我不希望其他窗口将其隐藏,即使它们也始终位于顶部".我正在使用wx.STAY_ON_TOPwx.FRAME_FLOAT_ON_PARENT,但仍然在我的顶部出现窗口.另外,任务栏显示在框架的顶部,而我希望它在框架的后面.

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.

有什么主意如何使我的框架真正位于顶部吗?

Any idea how to make my frame really on top?

推荐答案

由于这样做不是标准方法,因为这通常是不希望的效果,因此您可以通过将最高标志再次设置为否决"其他任何应用程序以排在最前列.您可以使用计时器来执行此操作,该计时器每隔x ms设置一次值,也可以尝试仅在窗口失去焦点时才再次设置ontop标志.设置ontop标志的事件是:

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 

这篇关于wxPython:将框架置于一切之上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆