To set and retrieve the current state of a radiobutton, these widgets have a resource named (-variable). This variable represents the current selection of a group of radiobuttons. Radiobuttons are grouped by giving them the same global variable. It is possible to specify which value is assigned to the variable when each button is pressed. This is done with the resource (-value).