That must be what I am missing. How do I call the functions so I can have
>the shapes appear on the canvas?
>
>AG> the same way you call all the other functions.
>AG> The bit I can't answer is *where* you call them. I'm not sure
>AG> where in your code you want them.
>AG> Is it before you press the buttons or is it when you press them?
>
>On 1/19/13 5:02 PM, "Alan Gauld" <alan.ga...@btinternet.com> wrote:
>
>>The shapes aren't there because you don't draw them. you have some
>>functions that might draw shapes but you never call them.
>
>>
>>> # Display a rectangle
>>> def displayRect(self):
>>> self.canvas.create_rectangle(10, 10, 100, 100, tages = "rect")
>>>
>>> # Display a Oval for the top light
>>> def displayOval(self):
>>> self.canvas.create_oval(10, 10, 10, 10)
>
>AG> So somewhere you need to write
>AG>
>AG> self.displayRect()
>
>
>AG> and
>AG>
>AG>self.displayOval()
>AG>
>AG>Except you probably want to modify them so you do it with the location:
>AG>
>AG>self.displayOval(10,10,10,10)
>
>--
>Alan G
>Author of the Learn to Program web site
>http://www.alan-g.me.uk/
>
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor