0xAX
0xAX

Reputation: 21837

Enable or disable gtk.Button in PyGTK

How can I set a gtk.Button enabled or disabled in PyGTK?

Upvotes: 20

Views: 13404

Answers (2)

Adam Rhoades
Adam Rhoades

Reputation: 37

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.

Upvotes: 2

Matthew Flaschen
Matthew Flaschen

Reputation: 285047

my_button.set_sensitive(False)

True is enabled, False disabled. See the gtk.Widget documentation.

Upvotes: 35

Related Questions