improved resizing and light

This commit is contained in:
UpstreamData
2022-05-16 11:55:13 -06:00
parent 1d04399daf
commit 404d6590db
2 changed files with 4 additions and 1 deletions

View File

@@ -155,9 +155,11 @@ class TableManager(metaclass=Singleton):
treedata = sg.TreeData()
for idx, item in enumerate(tables["CMD"]):
ico = LIGHT
status = " Off"
if self.data[item[0]]["Light"]:
ico = FAULT_LIGHT
treedata.insert("", idx, "", item, icon=ico)
status = " On"
treedata.insert("", idx, status, item, icon=ico)
window["cmd_table"].update(treedata)

View File

@@ -97,6 +97,7 @@ async def ui():
window["cmd_table"].Widget.bind(
"<Button-1>", lambda x: _tree_header_click_handler(x, window["cmd_table"])
)
window["cmd_table"].Widget.column("#0", width=80, stretch=tk.NO, anchor=tk.CENTER)
while True:
event, value = window.read(0)