日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

linux 窗口z order,wxPython窗口z-order设置

發布時間:2023/11/27 生活经验 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux 窗口z order,wxPython窗口z-order设置 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

使用wxpython寫的界面程序其實也是可以設置Z-order的。

可以使用pywin32模塊調用win32的API實現,使用方法不在贅述。

如果僅僅是想將窗口置頂(放在其他窗口上面,Z-order頂部),有一個簡單的方法:

在wx.Frame中調用一下這個方法

self.ToggleWindowStyle(wx.STAY_ON_TOP)

或者

self.SetWindowStyle(wx.STAY_ON_TOP)

注意,wx.Raise()的方法是有限制的,如下的Remark

virtual void wxWindow::Raise() [virtual]

Raises the window to the top of the window hierarchy (Z-order).

Notice that this function only requests the window manager to raise this window to the top of Z-order.

Depending on its configuration, the window manager may raise the window, not do it at all or indicate that a window requested to be raised in some other way, e.g. by flashing its icon if it is minimized.

Remarks:

This function only works for wxTopLevelWindow-derived classes.

如果始終置頂,可以在wx.Frame init里面加入屬性,如

def __init__(self,parent=None,id=-1,

pos=wx.DefaultPosition,

title='Hello',

style=wx.DEFAULT_FRAME_STYLE^(wx.MINIMIZE_BOX|wx.MAXIMIZE_BOX) | wx.STAY_ON_TOP):

enjoy ^_^

總結

以上是生活随笔為你收集整理的linux 窗口z order,wxPython窗口z-order设置的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。