How can I link a set of toggle buttons like radio buttons?
问题 I am using Python 3 with gobject introspection for Gtk. How can I have more than one toggle button linked together so they behave similar to tabs or radiobuttons - e.g. one is selected by default, and when another is clicked the previously active one is de-selected. I have tried using set_sensetive , but that greys out the widget that it is applied on. 回答1: Use set_active() (or props.active ). Alternatively, you can create some Gtk.RadioButton widgets and set draw_indicator property to False