Pysimplegui 和表格行颜色

发布于 2025-01-10 18:08:52 字数 462 浏览 4 评论 0原文

我正在使用最新的 pysimplegui 和最新的 python。 我有这张表,其中前 4 行有颜色。 是否可以使一行中的某些单元格(背景颜色)不获得分配给该行的颜色?

所以我不是在谈论

alternating_row_color='颜色'

,但是这个

窗口['-table-'].Update(row_colors=[[0,'red']])

窗口['-table-'].Update(row_colors=[[1,'黄色']])

窗口['-table-'].Update(row_colors=[[2,'绿色']])

窗口['-table-'].Update(row_colors=[[3,'绿色']])

这使得整行变成一种颜色,但是有某些单元格我不想为其指定颜色。

谢谢

I'm using latest pysimplegui with latest python.
I have this table where the first 4 rows have colors.
Is it possible to make certain cells(background color) in a row to not get the color assigned to that row?

So i'm not talking about

alternating_row_color='color'

, but this

window['-table-'].Update(row_colors=[[0,'red']])

window['-table-'].Update(row_colors=[[1,'yellow']])

window['-table-'].Update(row_colors=[[2,'green']])

window['-table-'].Update(row_colors=[[3,'green']])

This makes the entire row in a color, but there are certain cells i don't want to have a color assigned to it.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文