gtk+ checkbutton settings
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 开发者_Python百科I don't want the user to be able to change it.
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.
精彩评论