[pygtk] Setting the cursor on a Combobox GDK Window
Shandy Brown
sjbrown at vmware.com
Fri Oct 17 02:42:58 WST 2008
Hi all.
I've been struggling with how to set the cursor on the GDK Window that
pops up when you click on a combobox. I think I need to use
get_root_window() as demonstrated in the snippet below. This works but
I'm seeking confirmation that get_root_window() is actually returning
what I think it is. Anybody more informed than myself care to comment?
----8<---------------------------------------------------------8<----
self.comboBox.connect('realize', self._comboRealized)
def _comboRealized(self, widget):
# The root window is the GDK Window that pops up when a user clicks
# on the comboBox widget. It doesn't exist until the comboBox is
# realized, so we have to set the cursor in this special function.
rootWin = self.comboBox.get_root_window()
rootWin.set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR))
---->8--------------------------------------------------------->8----
sjbrown
More information about the pygtk
mailing list