Python Forum
[Tkinter] Extracting Data from a Command Subroutine
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Extracting Data from a Command Subroutine
#1
Thanks in advance for all the help so far. I am now at the next layer of the onion. I am using this submit button:

submitButton=tk.Button(top,text='Submit',command=lambda: submitData(top)).grid(row=rw,column=2,pady=5,sticky=tk.W)
Here is my submitData routine:
def submitData(top):
    for widget in top.children.values():
        print(widget)
    top.quit()
The output from this is:
Output:
.!radiobutton .!radiobutton2 .!radiobutton3 .!label .!entry .!label2 .!entry2 .!label3 .!entry3 .!radiobutton4 .!radiobutton5 .!combobox .!label4 .!button .!button2
How do I extract the values from these widgets? '.get()' does not work with these.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Extracting data from mysql xgrzeniu 2 2,717 May-18-2018, 03:03 PM
Last Post: xgrzeniu

Forum Jump:

User Panel Messages

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