June 2025
Intermediate to advanced
515 pages
17h 5m
English
A radio button, also referred to as an option button, is a control that allows only one option out of a number of options to be selected. This control can be created using the following method:
Radiobutton(main,text="Sphere",variable=select,value="sp")
The first parameter (main) refers to the window in which the radio button is to be inserted. The second parameter sets the label. The third parameter (variable) must be assigned a global variable that manages and summarizes the options of the selection. The fourth parameter activates the selected option. Listing 11.4 shows how the moment of inertia is calculated for the three bodies (point mass, solid cylinder, and sphere), after the user makes a selection ...
Read now
Unlock full access