DEV Community

Hussein Ouda
Hussein Ouda

Posted on

Problem with python tkinter when calling a function to display the input on the interface of the program?

I wrote a program code on python tkinter for employee data The database has been connected and the information has been entered into the table successfully:

from tkinter import *
from tkinter import ttk
import pymysql
class Employee:
    # ----------- إنشاء نافذة البرنامج -----------
    def __init__(self, root):
        self.root = root

Discussion (1)

Collapse
hussein_ouda profile image
Hussein Ouda Author

I found the solution to the problem

says wrong

It expects to get iterable for any indication of a particular purpose,

while it receives a function, so the function must be called by bracketing () for it

self.student_table.delete(*self.student_table.get_children())
                                                          ^^
Enter fullscreen mode Exit fullscreen mode

Thank you to everyone who participated or tried to help