diff --git a/main.py b/main.py index c1dccf4..221bfe3 100644 --- a/main.py +++ b/main.py @@ -72,7 +72,7 @@ def main(): db= TinyDB("./db.json") computer = format_table(db.all()) # Create the window - window = sg.Window('Window Title', layout, finalize=True) + window = sg.Window('Computer Keeper', layout, finalize=True) WINDOW=window window["table"].update(computer) table = window['table'].Widget @@ -121,6 +121,12 @@ def main(): ) window["table"].update(format_table(result)) + elif event == "table": + row=window["table"].get()[values["table"][0]] + window["Serial Number"].update(row[0]) + window["Brand"].update(row[1]) + window["Grade"].update(row[2]) + window["Name"].update(row[3]) # Finish up by removing from the screen window.close()