How can I set a gtk.Button
enabled or disabled in PyGTK?
Asked
Active
Viewed 1.3k times
2 Answers
32
my_button.set_sensitive(False)
True is enabled, False disabled. See the gtk.Widget documentation.

Matthew Flaschen
- 278,309
- 50
- 514
- 539
-
7Note, sensitivity can also be turned off for any widget, so you can desensitize an entire box, form, window, etc. – ThorSummoner Sep 07 '15 at 02:10
1
If you don't want to see the object then you could button.set_visible(False)
to hide it or button.set_visible(True)
to show it. This will prevent users from seeing the button.

Adam Rhoades
- 17
- 3