Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9107581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:36:25+00:00 2026-06-17T02:36:25+00:00

I am trying to make a basic drawing program with a RadioButton to determine

  • 0

I am trying to make a basic drawing program with a RadioButton to determine shape of the brush.

self.choseo = Radiobutton(text='Circle', variable=shape,indicatoron=0, value=1)
self.choser = Radiobutton(text='Rectangle', variable=shape,indicatoron=0, value=2)
self.chosea = Radiobutton(text='Arc', variable=shape,indicatoron=0, value=3)

Which corresponds to:

   if shape.get()==3:
      self.display.create_arc( self.x1, self.y1, self.x2,
          self.y2, fill = mycolor, outline= mycolor, tags = "line")
   elif shape.get()==2:
      self.display.create_rectangle( self.x1, self.y1, self.x2,
          self.y2, fill = mycolor, outline= mycolor, tags = "line")
   elif shape.get()==1:
      self.display.create_oval( self.x1, self.y1, self.x2,
          self.y2, fill = mycolor, outline= mycolor, tags = "line")

When i run this i get this error:

"TypeError: get() takes exactly 1 argument (0 given)"

How do i make this work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T02:36:26+00:00Added an answer on June 17, 2026 at 2:36 am

    You didn’t tell what shape is, but you should make sure your use an instance of IntVar.

    Try the following code:

    from Tkinter import *
    master = Tk()
    shape = IntVar() # ensure you use an instance of IntVar
    Radiobutton(text='Circle', variable=shape, indicatoron=0, value=1, master=master).pack()
    Radiobutton(text='Rectangle', variable=shape, indicatoron=0, value=2, master=master).pack()
    Radiobutton(text='Arc', variable=shape, indicatoron=0, value=3, master=master).pack()
    

    and shape.get() will work the way you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a basic encryption program that used random numbers to encrypt
I am trying to make a program which does a very basic calculation, but
I'm trying to make a basic wxWidgets program that doesn't leak any memory (I'm
So I am trying to make a program which will generate random basic mathematical
Im trying to make a basic shape ( Hexigon ) to start and learn
I'm trying to make a basic program that allows a user to create a
I'm trying to make a relatively basic text based RPG in C# in Visual
Im trying to make a basic while loop example im preperation for my next
I'm trying to make a basic hover on a ul element, which would display
I am trying to make a very basic game with Java and I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.