我有一个 gui,上面有一个带有值表的按钮。我希望它在按下按钮时更改表格值的背景颜色。有谁知道怎么做?
这是我的布局代码:
layout: list = [
sg.Table(
values=[[0, 0], [0, 0], [0, 0]],
headings=["Values", "Percent Difference"],
size=(5, 5),
num_rows=3,
background_color="white",
text_color="black",
hide_vertical_scroll=True,
key="_TABLE_",
),
sg.SetOptions(element_background_color='#FFFFFF',
key="_COLOR_"),
],
[
sg.Button(
button_text="Analyze",
tooltip="Once channels and points are selected, use this to complete Cg/Cv analysis.",
enable_events=True,
key="_ANALYSIS_",
),
]