Skip to main content

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]

标准配色随时可能变动,建议自行指定颜色。

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)

设置indexindex2列的数据。

get_selected()

获取当前选中块的文本,无则返回None

delete_row(index:int)

删除某行。

delete_col(index:int)

删除某列。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tinuisheet-0.1.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tinuisheet-0.1.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file tinuisheet-0.1.0.tar.gz.

File metadata

  • Download URL: tinuisheet-0.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for tinuisheet-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3a80a63dc71b945657e66779e83e37b73a7360a5684b2f985d2ce1eed20539ef
MD5 183a4c9715090e1fcfaef9de2610ad61
BLAKE2b-256 ae36efe6bf2e04e732e2f5308c4a8fc21ef80b78bb593d6c9f85af6fc72d8107

See more details on using hashes here.

File details

Details for the file tinuisheet-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tinuisheet-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for tinuisheet-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb689040dd6bcea59832d400a2a00a51c7b6e08b2fb375f1419f5b2f012aedb5
MD5 489456bfa400a76d3257ff27dfbc3c16
BLAKE2b-256 41b4fb24a61d71bcca073718fa408deae5d8036d7963a5cc58900d192b8f9f1e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page