Skip to content

Commit eda82b7

Browse files
Create GUI app with Python, Tkinter
1 parent 796d58f commit eda82b7

File tree

1 file changed

+7
-30
lines changed

1 file changed

+7
-30
lines changed

p22.py

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -334,11 +334,11 @@ def submit():
334334

335335

336336
# Button
337-
def submit():
337+
def submit1():
338338
for i in user_info:
339339
print(f"my {i} is {user_info[i].get()}.")
340340

341-
button_entry=ttk.Button(win,text='Submit',command=submit)
341+
button_entry=ttk.Button(win,text='Submit',command=submit1)
342342
button_entry.grid(row=count+1,columnspan=3, padx=40, pady=10)
343343

344344

@@ -393,11 +393,11 @@ def submit():
393393

394394

395395
# Button
396-
def submit():
396+
def submit2():
397397
for i in user_info:
398398
print(f"my {i} is {user_info[i].get()}.")
399399

400-
button_entry=ttk.Button(lable_frame,text='Submit',command=submit)
400+
button_entry=ttk.Button(lable_frame,text='Submit',command=submit2)
401401
button_entry.grid(row=count+1,columnspan=3)
402402

403403

@@ -628,7 +628,7 @@ def func():
628628

629629
# ********** Button **************
630630

631-
def action():
631+
def action1():
632632
# m_box.showinfo('title','content of this message box !!')
633633
# m_box.showerror('title','content of this message box !!!')
634634
# m_box.showwarning('title','content of this message box !!!')
@@ -651,32 +651,9 @@ def action():
651651
m_box.showwarning("warning","you are not 18, visit this content on your own risk")
652652

653653

654-
sub_btn=ttk.Button(win,text="Submit", command=action)
654+
sub_btn=ttk.Button(win,text="Submit", command=action1)
655655
sub_btn.grid(row=1,columnspan=3,padx=40)
656656

657657

658658

659-
win.mainloop()
660-
661-
662-
663-
664-
665-
666-
667-
668-
669-
670-
671-
672-
673-
674-
675-
676-
677-
678-
679-
680-
681-
682-
659+
win.mainloop()

0 commit comments

Comments
 (0)