一个显示一些定制tkinter模块的模块
tkhelper的Python项目详细描述
Tkinter助手
显示一些自定义tkinter模块的模块。在
入门
您可以直接从GitHub下载这个项目,也可以使用Python的packagemanager(pip)。在
先决条件
有关先决条件,请参见requirements.txt。在
安装
使用pip安装此库。在
pip install tkhelper
运行测试
可以运行doctest和单元测试。在
运行doctests
使用python doctest。在
^{pr2}$运行单元测试
单元测试仍在开发中。在
示例用法
importtkinterastkfromtkhelper.widgetsimportResizableLabel,ResizableButtonfromtkhelper.progressbars.circularimportTransparentSpinnerBar,SpinnerLoadingBarroot=tk.Tk()circular_bar=TransparentSpinnerBar(root,kind=SpinnerLoadingBar)defstart_bar():circular_bar.start()resizable_button.config(command=stop_bar,text="Click the button to stop the circular loading bar")defstop_bar():circular_bar.stop()resizable_button.config(command=start_bar,text="Click the button to run the circular loading bar")resizable_label=ResizableLabel(root,text="Example resizable label",weight=0.9,resize=True)resizable_label.grid()resizable_button=ResizableButton(root,text="Click the button to run the circular loading bar",weight=0.5,resize=True,command=start_bar)resizable_button.grid()root.geometry("500x500")root.mainloop()
版本信息
版本1.0.0。在
作者
- Erdogan Onal-Owner-Erdogan Onal
许可证
这个项目是在MIT许可下授权的-请参阅LICENSE文件了解详细信息
- 项目
标签: