使用tkinter开发高级GUI调试库
Project description
Paperl📃
一个使用众多扩展库与个人研究合并而成的tkinter超级扩展库。
示例🪧
按下s键可以切换主题
python -m Paperl
教程🥏
安装
首先安装Paperl库,如果需要体验最新内容,可以加上--pre选项
pip install Paperl
接下来你可以加入--upgrade选项开始更新。
pip install Paperl --upgrade
快速开始
先来一个最简单的示例文件。
from Paperl import Application, Window
App = Application()
Window = Window()
App.run(Window)
Paperl.Paperui.Widgets 基本组件库
Widget
所有组件的父类
useStyleSunValley(self, theme: Literal["light", "dark", "auto"] = "auto")
theme 主题,可设置为light浅色模式,dark暗黑模式,auto自动模式
启用太阳谷主题
getId(self)
获取组件的Id
gethWnd(self)
获取组件的窗柄(仅Windows系统)
showToast(self, title: str = "", message: str = "Message", appName: str = "Python", appIcon: str = "", timeOut: int = 0)
title通知的标题
message通知的文本消息
appName 显示通知的应用名
appIcon 显示通知的图标文件
timeOut通知的显示时间
显示通知
Application
应用程序,用于调用窗口运行等各种选项
alwaysUpdate(self, window)
window表示需要调用的窗口
一直刷新窗口,直到此窗口被销毁。
runAsync(self, window)
window表示需要调用的窗口
异步运行窗口,需安装async_tkinter_loop库
run(self, window)
window表示需要调用的窗口
正常运行窗口,直到主窗口被销毁
from Paperl import Application, Window
App = Application()
Window = Window()
App.run(Window)
Window
窗口组件
Button
按钮组件
__init__(self, parent: Widget, text: str = "")
parent 为组件父组件
text 为按钮组件的文本
setText(self, text: str)
text 组件的文本属性
设置按钮的文本属性
getText(self)
获取按钮的文本属性
onCommand(self, eventFunc: None = ...)
eventFunc 被绑定的事件函数。
绑定按钮被点击后触发的事件
buttonUseDafaultStyle(self)
将按钮主题设置为默认
buttonUseSunValleyAccentStyle(self)
设置按钮主题为太阳谷主题的Accent状态。
from Paperl import Application, Window, Button
Application = Application()
Window = Window()
Button = Button(Window)
Button.setText("Hello World")
Button.pack()
Application.run(Window)
版本
VER代表版本,后面三个数字代表版本号,最后这个数字代表更新内容的序列
0.0.1
VER0011 -> 稳定初始版本发布。
0.0.2
VER0020 -> 添加Padevel库,使用ctypes开发无需其他环境,节省安装过程
VER0021 -> 优化HeaderBar,标题也能获得标题栏同样的效果
VER0022 -> 去除Window.useStyleSunValley提示安装tkdev4的信息
VER0023 -> 加入TreeView、ListBox组件
VER0024 -> 为Paperl示例添加热键,按下s键即可切换主题
VER0025 -> 为Application和Window组件添加alwaysUpdate方法
VER0026 -> 将Paperl示例程序的标题栏背景材质设为MainWindow(仅限Windows11 22H2)
VER0027 -> 在Padevel.Windows.Dwmapi里添加dwmExtendFrameIntoClientArea组件(仅限Windows11 21H2)
VER0028 -> 为Window组件添加positionCenter方法,用于居中窗口
VER0029 -> 因为已经将SunValley主题纳入依赖库,所以去除使用主题时的提示
VER00210 -> 将Padevel.Windows.core命名为Core
VER00211 -> 完善文档
VER00212 -> 添加ToolBar组件
VER00213 -> 添加BreadcrumbBar组件
VER00214 -> 添加PanedWindow组件
VER00215 -> 添加InfoBar组件
VER00216 -> 为Entry组件加入setInvalid方法和setNotInvalid方法
笔记📓
开发时遇到了一些问题,使用ScrollText时,使用createHeaderBarEx设置的标题栏拖动窗口时,会导致程序错误,不知道为什么
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 Paperl-0.0.2.tar.gz.
File metadata
- Download URL: Paperl-0.0.2.tar.gz
- Upload date:
- Size: 103.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4de2c3fab1b18446d3247898a3debc0a4b5d2773fa6336a776d6055abdb95953
|
|
| MD5 |
d8cb9511993b6b57c13df366cbd2db63
|
|
| BLAKE2b-256 |
9c5e1a6e5aa2be50e3ba2ad8e1ddd2cf01bd6fe4ee520d192358237b1e37d0f3
|
File details
Details for the file Paperl-0.0.2-py3-none-any.whl.
File metadata
- Download URL: Paperl-0.0.2-py3-none-any.whl
- Upload date:
- Size: 124.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3414b5c410c85241e94e158d3e4a968780022ae0efdc501e95f07db4d9e8002
|
|
| MD5 |
684fc85769c349d47c8661ed71184157
|
|
| BLAKE2b-256 |
7fc83a2c272ac3adb28db27a698736915b01de7dedd8a59d03b241621715cb8e
|