Re: Help Pliz ! stuck on page 4 of tutorial
From: Patrick Useldinger (p_at_trick.lu)
Date: 11/22/03
- Next message: Richard Bird CCNP, CCDP, MCSE, etc.: "Re: Frustration with Boa Constructor"
- Previous message: Rene Pijlman: "Re: Database bind variables?"
- In reply to: Adolfo: "Help Pliz ! stuck on page 4 of tutorial"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 22 Nov 2003 11:06:19 +0100
Try this:
from Tkinter import *
class App:
def __init__(self, master): <========= name of constructor
frame = Frame(master)
frame.pack()
self.button = Button(frame, text="QUIT", fg="red",
command=frame.quit)
self.button.pack(side=LEFT)
self.hi_there = Button(frame, text="Hello", command=self.say_hi)
self.hi_there.pack(side=LEFT)
def say_hi(self):
print "Hi there, everyone !"
root = Tk()
app = App(root)
root.mainloop()
- Next message: Richard Bird CCNP, CCDP, MCSE, etc.: "Re: Frustration with Boa Constructor"
- Previous message: Rene Pijlman: "Re: Database bind variables?"
- In reply to: Adolfo: "Help Pliz ! stuck on page 4 of tutorial"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|