Python Forum
[Tkinter] button not defined
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] button not defined
#1
Hello, I am brand new to Pyton. I am using 3.7.1 for windows.

I am getting an error (NameError: name 'button' not defined) from the statement below.

button1=button(app, test = "this is a button")

I noticed that python was installed pretty deep in the file structure of my computer, many folders deep.

From the commmand window I can run python so I know my pathing is setup. I looked for the subfunction (I don't know what else to call it, I am brand new) called button and I found it. But is seems python is not able to find it and call it.

Anyone have any insite on how to fix my issue? Wall

Thank you in advance.
Reply
#2
If you're talking about a tkinter button, use Button(). That said, I don't think it accepts a 'test' keyword argument.
Reply
#3
capital B for tkinter.Button
and as pointed out by Gribouillis, it's text, not test
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Kivy] Acces atributes from a button defined in a class inside the .kv Tomli 2 2,088 Jun-10-2021, 01:05 AM
Last Post: Tomli
  [PySimpleGui] How to alter mouse click button of a standard submit button? skyerosebud 3 5,012 Jul-21-2019, 06:02 PM
Last Post: FullOfHelp
  Button not defined, why? gb_johnny 6 14,353 Nov-13-2017, 12:19 AM
Last Post: Windspar

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020