Re: [Tutor] Traffic Light

2013-01-20 Thread Russel Winder
On Sat, 2013-01-19 at 12:31 -0800, anthonym wrote: > Hello All, > > I am new to Python and taking a course now. One of my exercises is to > create a traffic light using tkinter. The exercise also requires that I > create radio buttons that allow the user to click on the color and the > correspo

Re: [Tutor] Traffic Light

2013-01-19 Thread ALAN GAULD
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 pres

Re: [Tutor] Traffic Light

2013-01-19 Thread Alan Gauld
On 19/01/13 23:29, anthonym wrote: Sure thing. Here is the code. And after that is the box I get with the radio buttons but no shapes. It all runs fine for me. I'm not sure what you are expecting but it does exactly what I'd expect... The shapes aren't there because you don't draw them. yo

Re: [Tutor] Traffic Light

2013-01-19 Thread Matthew Ngaha
On Sun, Jan 20, 2013 at 12:05 AM, Matthew Ngaha wrote: > On Sat, Jan 19, 2013 at 11:29 PM, anthonym wrote: >> Sure thing. Here is the code. And after that is the box I get with the >> radio buttons but no shapes. > i might be way off as im struggling to understand how tkinter works, but i not

Re: [Tutor] Traffic Light

2013-01-19 Thread anthonym
Sure thing. Here is the code. And after that is the box I get with the radio buttons but no shapes. from tkinter import * # Import tkinter class Trafficlight: def __init__(self): window = Tk()# Create a window window.title("Traffic Light") # Set a title # Pla

Re: [Tutor] Traffic Light

2013-01-19 Thread Matthew Ngaha
On Sat, Jan 19, 2013 at 10:56 PM, anthonym wrote: > Thanks again for the info Alan. I am still passing the button process > until I can get my rectangle and ovals on the canvass. The program runs > and produces a window with the radio buttons on top. I would like them on > the bottom but change

Re: [Tutor] Traffic Light

2013-01-19 Thread anthonym
Thanks again for the info Alan. I am still passing the button process until I can get my rectangle and ovals on the canvass. The program runs and produces a window with the radio buttons on top. I would like them on the bottom but changes to the row field have no effect. Anybody have any ideas

Re: [Tutor] Traffic Light

2013-01-19 Thread Alan Gauld
On 19/01/13 20:31, anthonym wrote: rbRed = Radiobutton(frame1, text = "Red", bg = "red", variable = self.v2, value = 1, command = self.processRadiobutton) Here you assign your method to the button # Add Radio Button process