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.
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.