[Gtk-sharp-list] Disabling UIManager Actions

Peter Johanson latexer at gentoo.org
Thu Aug 31 14:35:02 EDT 2006


On Mon, Aug 28, 2006 at 12:19:12PM +1200, Piotr Zurek wrote:
> Hi again,
> 
> One more question. Some of buttons in my menu/toolbar should be 
> dynamically enabled/disabled (Sensitive = true/false). It would be nice 
> to set the Action.Sensitive property which would disable the menu and 
> the toolbar items in one operation. All ideas welcome...

You want to access the Gtk.Action via the Gtk.ActionGroup you have it added
to, then set that insensitive:

action_group["MyActionName"].Sensitive = true/false;

-pete

> 
> Cheers
> Piotr
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> 

-- 
Peter Johanson
<latexer at gentoo.org>


More information about the Gtk-sharp-list mailing list