tags:

views:

36

answers:

1

Is there a way to use set_active on a gtkCheckButton but without the user being able to press/toggle the said button?

In other words, I want to programmatically control the active state of the CheckButton but I don't want the user to be able to change it.

+2  A: 

The "active" property of the gtk.ToggleButton combined with the "sensitive" property of the gtk.Widget should do what you want. You should just be able to do

checkbox1.set_sensitive(False)
checkbox1.set_active(True)

...to check it and have it remain unchangeable.

detly