tinui高级表格
Project description
TinUISheet
TinUI的高级表格控件。
[!warning]
TinUISheet已经可用于TinUI,但是当前仍处于早期开发状态。
使用
TinUISheet类
TinUISheet(
ui:BasicTinUI, pos:tuple, width=300, height=300, minwidth=100, maxwidth=300,
font=('微软雅黑', 12),
fg='black', bg='white', itemfg='#1a1a1a', itembg='#f9f9f9', headbg='#f0f0f0',
itemactivefg='#191919', itemactivebg='#f0f0f0',
itemonfg='#191919', itemonbg='#e0e0e0',
headfont=('微软雅黑', 14),
anchor='nw'
)
- fg-文本颜色
- bg-表格背景色
- itemfg-数据文本颜色
- itembg-数据背景色
- headbg-表栏背景色
- itemactivefg-响应鼠标整行文本颜色
- itemactivebg-响应鼠标整行背景色
- itemonfg-选中时文本颜色
- itemonbg-选中时背景颜色
[!note]
标准配色随时可能变动,建议自行指定颜色。
[!tip]
通过
TinUISheet.uid获取控件标识符,用于TinUI面板布局。TinSheet支持普通面板布局和拓展拉伸布局。当置于
ExpandPanel中时,表格外框会平铺面板区域,表格本体的原点仍为表格框左上角。
set_heads(heads)
设置整个表头文本。
对于
heads中的一项,如果为dict,则有如下结构:{ 'title': 'TITLE', 'width': WIDTH-INT // 宽度 }
set_head(index:int, head)
设置某个表头文本。
head可以为
str,也可以同上为dict。
append_content(content)
加入一行数据。
set_contents(index:int, contents:list)
设置一行数据(从表头栏下一行开始记为0)。
set_content(index:int, index2:int, content:str)
设置index行index2列的数据。
get_selected(specific=False)
获取当前选中行中的所有文本列表,无则返回None。
当specific为True时,返回选中块的文本。
delete_row(index:int)
删除某行。
delete_col(index:int)
删除某列。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tinuisheet-0.2.0.tar.gz.
File metadata
- Download URL: tinuisheet-0.2.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc35554bb4768db04448d22c5723f681d01311e535f022fd6b40c018e913e9ee
|
|
| MD5 |
9fecbaf1c0f630b8c2f4f6c862620695
|
|
| BLAKE2b-256 |
8ae0d490d8a58b71ad85329247fd3f9c10a7c123f52b319bc8e9b091b9366d0a
|
File details
Details for the file tinuisheet-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tinuisheet-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6139101413a773a011395e4c7c93195a62c2ae4e6ae0faf0d9cad680b5691ad9
|
|
| MD5 |
eb2b9e61456a860d50431c5669942652
|
|
| BLAKE2b-256 |
b750a73d4092032c25f210e61999f631dd5806ef0eee7e90ab33ba9d7f997a0d
|