views:

23

answers:

1

Hi all!
Is there a way to set the "sticky" bit for a frame/window, with wxPython?

(wxPython 2.8.9.1 under Ubuntu Jaunty)

A: 

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