用户:恩凡查看:0 回复:2 评论:0 创建时间:2019-08-08T16:17:03
代码举例:
import easytk
#初始化
easytk.create('你好easytk','300','190',None)
def tanchuang(): #定义消息框
easytk.message('你刚刚写的内容:'+str(Content), '惊不惊喜!', 'showinfo')
#插件
easytk.part('Label','欢迎来到easytk\n作者:海智\n官方网站:http://haizhi-studio.sxl.cn',None)
easytk.part('Label','请写下你想说的话',None)
Content=easytk.part('Enter',None,None)
easytk.part('Label','点击mei有惊喜',None)
easytk.part('Button','点我!点我!',1)
tanchuang()
#结束
easytk.mainloop()
哈哈,easytk库还在初步阶段,希望大家多多鼓励!
效果:
弹出了一个框:
哈哈,想不想下载?
地址:
https://gitee.com/EnFan_HaiZhi/enfan_library/tree/master/easytk
安装方法:
计算机中搜索:site-packages
把安装的easytk库放入即可!
附件:教程(英文版)
The easytk package can help youcreate a tkinter library more simply.
#The name of the window is Easytk.
1.Initialization code:
easytk.create('name','length','width','img')
Note: img is optional,if you want not fill it,pleasy fill in None.
2.Generate message box code:
If there are variables:
Variable=easytk.message('content','title','instructions)
#instructions:askokcancel,askquestion,askyesno,askretrycancel
If there aren't variables:
easytk.message('content','title','instructions')
#instructions:showinfo,showwarning,showerror
3.Get file information
Variable=easytk.file('instructions','get')
#instructions:asksaveasfilename,asksaveasfile,askopenfilename,askopenfile,askdirectory,askopenfilenames,askopenfiles
4.Call plug-in
(1)Entry:
easytk.part('Component_name',None,None)
(2)Button
easytk.part('Component_name','text,address') eg:easytk.part('Button','Point me!,1')
(3)Label
easytk.part('Component_name','text')
5.Last step
easytk.mainloop()
#————#————#————#————#————#————#————#————#————#————#————#————#————#————#
Other functions are being developed one after another, please wait patiently. Our website: http://haizhi-studio.sxl.cn