How do I create a RadioButton in my GUI in python?

Shan

I've been trying to create a simple RadioButton, but the issue is that both buttons already show up as clicked (they have the black circle inside of them when the GUI starts up). How would I fix this?

this.myVar = StringVar()
this.button1 = Radiobutton(this.root,text = "Small Boxes First",variable = this.myVar)
this.button1.grid(row = 2,column = 5)
this.button2 = Radiobutton(this.root,text = "Large Boxes First",variable = this.myVar)
this.button2.grid(row = 3,column = 5)
John

Use SetValue(self, False) to set it to unchecked. You can read more about it here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How do I assign a website URL as the value of a selected radiobutton in a Python GUI using Tkinter?

Python - How do I get my GUI to display in Spyder

In python, with tkinter, how do I create shortcut keys for my widgets?

How do I make my python tkinter output to show in GUI instead of python shell?

How can I create a background for my GUI with pysimplegui?

How to create a loop based on click of RadioButton in Python

How do I properly change the values of a Radiobutton?

How can I do a quiz with radiobutton?

How do I position my title on top of the GUI window?

MATLAB GUI - How do I remove the CreateFcn callback in my code?

How do i add image in my gui window with tkinter and PIL

How do I get JFrame to display my GUI?

How do I add an image using pillow to my tkinter GUI?

How do I create my own hints when for my custom Python functions, in VS Code?

How do I create varied colors for buttons in Java GUI?

How do I Create a Sequence of Circles In a GUI Java Program

How do I create the following GUI in Java Swing?

How do I create an automatically updating GUI using Tkinter?

how do i create a gui in monodevelop using c++?

How do I create a GUI for already existing data within MVC?

How do I create a terminal-based GUI?

I want to retrieve and show the values in this basic python GUI form. how to retrieve the radiobutton and checkbox values and display it? Here's Code

How to connect my python back end to my HTML front end to create a GUI for Double hashing ? Any other means to create a GUI?

How do I create a list that contain all my conditions without ending with a long if elif stament in Python?

After I create my code, how do I give it a database?

How can I set the radiobutton selection with my method btnCalcularOnClick()?

How do I make this python GUI run this executable?

How do I programmatically video record a window / GUI application in python?

How do I update the GUI from another thread? using python