Forum: Ruby-Gnome 2 Disabling Gtk::Button

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
38c49ce0f1fdacfe001eacfc1f9d4096?d=identicon&s=25 Aditya Rajgarhia (ar1)
on 2006-06-12 19:31
(Received via mailing list)
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
4913bcb685792f601ae9813b4713abb9?d=identicon&s=25 Detlef Reichl (Guest)
on 2006-06-12 20:07
(Received via mailing list)
On So, 2006-06-11 at 22:24 -0500, Aditya Rajgarhia 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
This topic is locked and can not be replied to.