PyGTK RadioButton Class - PyGTK

What is PyGTK RadioButton Class?

An only RadioButton widget offers functionality alike to CheckButton. Though, when more than one radio button is existing in the same container, then a equally high-class choice is accessible for the user to choose from one of the available options. If each radio button in the container fits to the same group, then as one is selected, others are spontaneously deselected.

The resulting is a constructor of the gtk.RadioButton class –

In order to generate a button group, offer group=None for the first Radio button, and for the following options, offer the object of the first button as group.

As in case of ToggleButton and CheckButton, the RadioButton also emits the toggled signal. In the instance given below, three objects of the gtk.RadioButton widget are placed in a VBox. All of them are connected to a callback function on_selected(), to process the toggled signal.
The callback function identifies the label of source RadioButton widget and displays it on the label put in the VBox.

Example

Observe the resulting code –

The above code will produce the resulting output –

radio_button

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

PyGTK Topics