Set menu items sensitive



Hi,

I'm now working on a menu (UIManager technique) which should show some
items only under certain conditions. For this, I did,

Glib::RefPtr <Gtk::Action> myFirstItem;

myFirstItem = Gtk::Action::create (....);   // All fine, 'till here.

if (condition)
    myFirstItem->set_sensitive (true);
else
    myFirstItem->set_sensitive (false);

The problem is that the method set_sensitive() seems not to run when
the structure *if* is readed further.
Could change anymore else ?

Thanks,

Glus


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]