[gtkmm] How to set a button back to its released(?) state?



Hi,

 I'm writing an application where there are two buttons.  If one of the
 buttons is in the released (default) state, the other has to be made
 non-sensitive _and_ released, too.  In time it would for example like
 this (P = pressed, R = released, S = sensitive, N = non-sensitive)

    [ R, N ]  [ R, N ]

    [ R, S ]  [ R, N ]

    [ P, S ]  [ R, S ]

    [ P, S ]  [ P, S ]

    [ R, S ]  [ R, N ]

 In the last step, I can get the button to the non-sensitive state by
 calling button.set_sensitive(false), but I can't get it to the released
 state.  Something like:

    if (button.get_active())
        button.clicked();

 does it, with the side effect that it triggers the clicked signal,
 which I don't necessarely want to happen.

 Is there a better way?

 TIA,

-- 
Marcelo



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