Marking a frame as sticky with wxPython
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()
精彩评论