你的心如利箭 在风中笔直的飞翔
github DNS ALEXA CDN
jquery JS CSS CSS3 HTML5 svg php --- isux w3cplus

21270

  博客园  :: 首页  ::  ::  ::  :: 管理

图形用户界面(Graphical User Interface,简称 GUI)

http://www.runoob.com/python/python-gui-tkinter.html  Python GUI编程(Tkinter) —— 菜鸟教程

 

随便看看:

http://www.cnblogs.com/joechinochl/articles/7485709.html  八款常用的 Python GUI 开发框架

http://www.cnblogs.com/monsteryang/p/6558693.html  python GUI编程(Tkinter)

http://www.cnblogs.com/monsteryang/p/6558904.html  简单的python GUI例子

 


 

注意:Python3.x 版本使用的库名为 tkinter,即首写字母 T 为小写。

import tkinter

 

例子1:

from tkinter import *

def on_click():
    label['text'] = text.get()

root = Tk(className='hello')
root.minsize(600, 400)

label = Label(root, text="your message")
label.pack()

text = StringVar()
text.set('请输入:')
entry = Entry(root)
entry['textvariable'] = text
entry.pack()

frame = Frame(root)
frame.pack()
Button(frame, text="QUIT", fg="red", command=frame.quit).pack(side=RIGHT)
Button(frame, text="change", fg="blue", command=on_click).pack(side=LEFT)

root.mainloop()

 

 

 

 

...

posted on 2017-12-06 00:47  bjhhh  阅读(631)  评论(0编辑  收藏  举报