Made Changes to rows and name
Some checks are pending
Potlatch Loggers Organization/ComputerKeeper/pipeline/head Build queued...
Some checks are pending
Potlatch Loggers Organization/ComputerKeeper/pipeline/head Build queued...
This commit is contained in:
parent
2db9b71605
commit
45a1dd9d99
8
main.py
8
main.py
@ -72,7 +72,7 @@ def main():
|
|||||||
db= TinyDB("./db.json")
|
db= TinyDB("./db.json")
|
||||||
computer = format_table(db.all())
|
computer = format_table(db.all())
|
||||||
# Create the window
|
# Create the window
|
||||||
window = sg.Window('Window Title', layout, finalize=True)
|
window = sg.Window('Computer Keeper', layout, finalize=True)
|
||||||
WINDOW=window
|
WINDOW=window
|
||||||
window["table"].update(computer)
|
window["table"].update(computer)
|
||||||
table = window['table'].Widget
|
table = window['table'].Widget
|
||||||
@ -121,6 +121,12 @@ def main():
|
|||||||
)
|
)
|
||||||
window["table"].update(format_table(result))
|
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
|
# Finish up by removing from the screen
|
||||||
window.close()
|
window.close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user