Skip to content

Instantly share code, notes, and snippets.

@ssokolow
Created June 25, 2009 03:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssokolow/135656 to your computer and use it in GitHub Desktop.
Save ssokolow/135656 to your computer and use it in GitHub Desktop.
How to fake a gtk.RadioToolButton group where you can set all buttons inactive
# PyGTK doesn't let you set_active(False) on all radio buttons.
# You can work around that by adding a button to the group which will never
# be made visible to the user. (Don't add it to any window)
self.zoom_100 = self.wTree.get_widget("zoom_100")
self.zoom_fit = self.wTree.get_widget("zoom_fit")
self.zoom_manual = gtk.RadioToolButton(self.zoom_100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment