Disabling Gtk::Button


#1

Hi,

I’m creating a game that has a few buttons, and once the player has won,
the
buttons should be disabled (i.e. they cannot be clicked anymore). The
window
should still be there though so the user can view the final game board.

I could not find a method in the Gtk::Button API for disabling a button.
How
to achieve this?

Thanks,

Aditya


#2

On So, 2006-06-11 at 22:24 -0500, Aditya R. wrote:

Hi,

I’m creating a game that has a few buttons, and once the player has
won, the buttons should be disabled (i.e. they cannot be clicked
anymore). The window should still be there though so the user can view
the final game board.

I could not find a method in the Gtk::Button API for disabling a
button. How to achieve this?

Hi,

use

my_button.sesitive = false

you can also use it for containers to de/activete complete groups of
widgets

cheers
detlef