Python Forum
[TkInter]Simple Python Homework
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[TkInter]Simple Python Homework
#1
Hi, this is my first time on this site and first ever time doing python. So the code might (will) be bad. I am trying to have a entry field where whatever the user types in it will print it out when clicking on the button created but it does not work.

this is my code:

from Tkinter import *

root = Tk()

label = Label(root, text="Name")
label.grid(row=0, column=0)

entry = Entry(root, bd=5)

entry.grid(row=0, column=1)


def helloCallback():
print ()


b = Button(root, text="Submit", command=helloCallback)
b.grid(row=0, column=2)

root.mainloop()
Reply


Messages In This Thread
[TkInter]Simple Python Homework - by zaji_123 - Dec-13-2017, 06:25 PM
RE: [TkInter]Simple Python Homework - by mpd - Dec-13-2017, 08:39 PM
RE: [TkInter]Simple Python Homework - by zaji_123 - Dec-14-2017, 06:12 PM
RE: [TkInter]Simple Python Homework - by EliesBe - Jan-01-2021, 07:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Where can I get loooads of simple homework questions for kids? omar 1 1,034 Nov-09-2022, 02:33 PM
Last Post: Larz60+
  HELP in python homework makashito 4 4,037 Oct-12-2021, 10:12 AM
Last Post: buran
  CyperSecurity Using Python HomeWork ward1995 1 2,020 Jul-08-2021, 03:55 PM
Last Post: buran
Exclamation urgent , Python homework alm 2 2,393 May-09-2021, 11:19 AM
Last Post: Yoriz
  Homework with python Johnsonmfw 1 1,742 Sep-20-2020, 04:03 AM
Last Post: ndc85430
  Please help. Simple homework Asm0deus314 3 3,470 Feb-02-2020, 07:03 PM
Last Post: michael1789
  Python Homework Help *Urgent GS31 2 2,652 Nov-24-2019, 01:41 PM
Last Post: ichabod801
  Python Homework Question OrcDroid123 1 2,432 Sep-01-2019, 08:44 AM
Last Post: buran
  Python homework / functions sunhyunshine 1 2,512 May-11-2019, 05:37 PM
Last Post: MrTheOne
  python homework help ASAP gk34332 1 3,044 Mar-13-2019, 07:27 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

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