tk

from tkinter import *

class Application(Frame):
    def say_hi(self):
        print("hi there, everyone!")

    def createWidgets(self):
        self.QUIT = Label(self)
        self.QUIT["text"] = "请点击按钮记录工时..."
        self.QUIT["fg"] = "red"
        self.QUIT["bg"] = "white"
#        self.QUIT["command"] = self.quit

        self.QUIT.pack({"side": "top"})

        self.hi_there = Button(self)
        self.hi_there["text"] = "记录工时",
        self.hi_there["command"] = self.quit

        self.hi_there.pack({"side": "bottom"})

    def __init__(self, master=None):
        Frame.__init__(self, master)
        self.pack()
        self.createWidgets()
#----------------程序入口-------------------------------
root = Tk()
root.title('工时记录统计客户端')
root.geometry('345x272+100+100')
app = Application(master=root)
app.mainloop()
root.destroy()
posted @ 2012-09-14 17:35  做一个内心安静的人  阅读(244)  评论(0编辑  收藏  举报