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

  • Home
  • SEARCH
  • 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 8385513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:41:23+00:00 2026-06-09T17:41:23+00:00

I am coding my first GUI application to find products for a company. from

  • 0

I am coding my first GUI application to find products for a company.

from Tkinter import *
import tkMessageBox

def debug():
    buttonText = relStatus.get()
    tkMessageBox.showinfo("You Clicked ", buttonText)
    return

app = Tk()
app.title("Ironcraft Product Finder")
app.geometry("700x500")

labelText = StringVar()
labelText.set("Choose an Appliance Type")
topLabel = Label(app, textvariable = labelText, height = 5).pack()

fire = Button(app, text="Fire", width=20, command=debug)
fire.pack(padx=10)

relStatus = StringVar()
relStatus.set(fire.text)

app.mainloop()

When I run this, it comes up with the error message:

AttributeError: Button instance has no attribute 'text'

But in the creation of ‘fire’ it says

text="fire"

Isn’t this an attribute?

  • 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-09T17:41:24+00:00Added an answer on June 9, 2026 at 5:41 pm

    The Tkinter module is a little old-skool; the text value can be accessed via an item lookup:

    relStatus.set(fire['text'])
    

    See the Setting Options section of the Tkinter documentation.

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

Sidebar

Related Questions

I am coding my first CodeIgniter application (very familiar with PHP, but not CI)
I am working on a java gui application hard coding without any netbeans help.
I am looking tyo write my first .Net application, coming from a *nix background.
Background: I am new to MVP and just coding my first winform application using
I'm finding myself coding C3 for the first time, and using Visual Studio for
This is my first time on StackOverflow though I read Coding Horror quite often.
I initially used MD5 when i first started out coding to hash user passwords.
I wrote my first program almost fifty years ago (yes, coding is still a
First off, I'm a complete beginner at C++. I'm coding something using an API,
First off, I'm coming (back) to Java from C#, so apologies if my terminology

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.