[pygtk] Avoiding recursive event loops... or using better toggle buttons

Steve McClure smcclure at racemi.com
Wed Mar 15 03:29:16 WST 2006


On Tue, 2006-03-14 at 15:41 -0300, Ricardo Staudt wrote:
> Hello everyone, this is a tricky question:
> 
> I'm trying to make a list of toggle buttons that, when one is pressed, 
> the others are unpressed. I don't see a way to link them to do this 
> automatically (if you guys know, please let me know), so I what I try is 
> something like this:
> 
> Whenever one Toggle button is clicked, it raises the click event, there 
> (inside the event function) I unpress all others by hand.
> 
> The problem is that when I unpress them it calls for the same click 
> event function, causing a "recursion limit" error. Any ideas?

It sounds like you want the behavior of RadioButtons instead of just
ToggleButtons.

> _______________________________________________
> pygtk mailing list   pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-- 
Steve McClure                                           Racemi
email: smcclure at racemi.com                              380 Interstate North Pkwy, SE
voice: 404-892-5850                                     Suite 250
fax: 404-892-7215                                       Atlanta, GA 30339
                                                        http://www.racemi.com



More information about the pygtk mailing list