使用wxPython将框架标记为粘性

时间:2009-12-16 13:00:04

标签: wxpython wxwidgets

有没有办法用wxPython设置框架/窗口的“粘滞”位?

(Ubuntu Jaunty下的wxPython 2.8.9.1)

1 个答案:

答案 0 :(得分:0)

以下是我提出的建议:

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()