[pygtk] gtk.MenuItem status change

Johan Dahlin jdahlin at async.com.br
Thu Feb 16 22:54:06 WST 2006


Toufeeq Hussain wrote:
> Hi,
> 
> I'm currently using the gtk.MenuItem widget in my pygtk script.
> My requirement is to disable the menuitem and enable it back again
> based on some defined logic.
> 
> As per the Pygtk reference manual [1] this is currently not possible.
> Is there are an alternate way to go about disabling a menu item ?
> 
> I do not want to unhide it but rather disable it.
> 
> [1] http://www.pygtk.org/pygtk2reference/class-gtkmenuitem.html

menuitem.set_sensitive(False)

PS. Check the parents, set_sensitive is a method on gtk.Widget.

-- 
Johan Dahlin <jdahlin at async.com.br>
Async Open Source


More information about the pygtk mailing list