开发者

Marking a frame as sticky with wxPython

开发者 https://www.devze.com 2022-12-14 16:37 出处:网络
Is there a way to set the \"sticky\" bit for a frame/window, with wxPython? 开发者_开发问答 (wxPython 2.8.9.1 under Ubuntu Jaunty)Here\'s what I came up with:

Is there a way to set the "sticky" bit for a frame/window, with wxPython? 开发者_开发问答

(wxPython 2.8.9.1 under Ubuntu Jaunty)


Here's what I came up with:

import gtk

def set_sticky(frame):
    gdkwin = gtk.gdk.window_lookup(frame.GetHandle())
    win = gdkwin.get_user_data() # http://library.gnome.org/devel/gdk/unstable/gdk-Windows.html#gdk-window-get-user-data
    while not isinstance(win, gtk.Window):
        win = win.get_parent()
    win.stick()
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号