tkinter中的网格视图(表格列表) [英] Grid View (Table list) in tkinter

查看:608
本文介绍了tkinter中的网格视图(表格列表)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

tkinter是否有任何数据网格样本?

Is there any data grid sample for tkinter?

推荐答案

AruzV,


你能更具体一点吗?您是否正在使用网格几何管理器查找Tkinter小部件的示例?
AruzV,

Can you be more specific? Are you looking for an example of a Tkinter widget using the grid geometry manager?


我需要在tkinter中使用示例表查看器,例如excell或任何数据库查看器。它必须有列,行和标题。像这样。


_ | _A_ | _B_ | _C_ | _D_ | _E_ |

1 | ___ | ___ | ___ | ___ | ___ |

2 | ___ | ___ | ___ | ___ | ___ |

3 | ___ | ___ | ___ | ___ | ___ |

4 | ___ | ___ | ___ | ___ | ___ |

5 | ___ | ___ | ___ | ___ | ___ |
I need a sample table viewer in tkinter like excell or any database viewer. It must have Columns and rows and headers. Like this.

_|_A_|_B_|_C_|_D_|_E_|
1|___|___|___|___|___|
2|___|___|___|___|___|
3|___|___|___|___|___|
4|___|___|___|___|___|
5|___|___|___|___|___|


您是否尝试自行编码?你对Tkinter有什么了解吗?这是家庭作业吗?我可以像你描述的那样提供参数化构建网格的代码,但是我们不会在没有他们努力的情况下向人们提供代码。我附上了Tkinter.Entry小部件网格的图像。列和行标题不可修改。可以将字符输入到开放网格中。字段绑定到''< FocusOut>''(如果不是空白则打印字段内容,如果输入'exit'则销毁顶级窗口小部件)。


BV - 版主





Have you tried to code this for yourself? Do you know anything about Tkinter? Is this homework? I can provide code to parametrically build a grid like you describe, but we are not here to provide code to people without some effort on their part. I attached an image of a grid of Tkinter.Entry widgets. The column and row headers are not modifiable. Characters can be entered into the open grids. The fields are bound to ''<FocusOut>'' (prints field contents if not blank, destroys the top level widget if ''exit'' is entered).

BV - Moderator
< fieldset class =fieldset> Attached Images
EntryGrid.gif (5.9 KB,22159 views)
Attached Images
EntryGrid.gif (5.9 KB, 22159 views)


这篇关于tkinter中的网格视图(表格列表)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆