python之简单窗口

from Tkinter import*
def on_click():
    label['text']= text.get()

root = Tk(className='programming our future')

label = Label(root)
label['text']='be on your own'
label.pack()

text = StringVar()
text.set('who are you,kid')

entry = Entry(root)
entry['textvariable']=text
entry.pack()

button = Button(root)
button['text'] = 'click me,give you a surprse'
button['command']=on_click
button.pack()

root.mainloop()

posted on 2013-05-02 22:31  果冻虾仁  阅读(146)  评论(0编辑  收藏  举报

导航