improved resizing and light
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user