猫史档案馆


【恩凡库发布啦】帮助你更好地编写窗口gui!(库名:easytk)

用户:恩凡恩凡查看: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库还在初步阶段,希望大家多多鼓励!

效果:

center_image

 

弹出了一个框:

center_image

哈哈,想不想下载?emotion_编程猫_厉害了

地址:

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


回复

上一页1 页 / 共 1下一页
恩凡恩凡

直接找到easytk下载就好了(是文件夹)

点赞0


评论


人生若只如初见_人生若只如初见_

捧场emotion_编程猫_点赞

点赞0


评论