您的位置:首页 > 其它

标签,按钮,进度条组件

2012-12-19 15:21 134 查看
# -*- coding: cp936 -*-
from Tkinter import *

def resize(ev=None):
label.config(font='Helvetica -%d bold' % \
scale.get())

top=Tk()
#top.geometry('250×150')

label=Label(top,text='Hello World!',
font='Helvetica -12 bold')
label.pack(fill=Y,expand=1)

scale=Scale(top,from_=10,to=40,
orient=HORIZONTAL,command=resize)
#scale.get(12)
scale.pack(fill=X,expand=1)

quit=Button(top,text='QUIT',
command=top.quit,activeforeground='white',
activebackground='red')
quit.pack()

mainloop()
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: