[Tutor] Multiple buttons, One callback (fwd)

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Fri Aug 4 18:40:18 CEST 2006


Hi everyone,

Can someone help with Michael's question?  Unfortunately, I can't answer 
it at the moment.

Here it is below.  (I've stripped off the image attachment.)


---------- Forwarded message ----------
Date: Fri, 4 Aug 2006 09:32:48 -0700 (PDT)
From: Michael Cochez <michaelcochez at yahoo.com>
To: dyoo at hkn.eecs.berkeley.edu
Subject: Multiple buttons, One callback

Hi Danny,
I've just been reading your reply on this subject at
http://mail.python.org/pipermail/tutor/2005-September/041358.html
about a year ago.
I need something like this but also something more:
I'm making an app with an interface that is going to
look like in the added image. The "=" buttons are
there to copy the contents of the previous lines to
the current line.
To make the buttons tried a lot of things but the
problem is: the number of buttons is always different
(one less as the number of day) so it can be none or
20 or something else. So i putted the creation in a
for loop.
But now the real problem: every button must have its
own callback(because the linenumber is different) So
my question is: how can I give each button its 'own'
callback while only having one (the callbacks are all
the same but with another value of linenumber. I added
a piece of the code to show what i mean.

michaelcochez,

PS:excuse me if my English isn't comprehensive, I'm
not a native English speaker (I speak Dutch at home)

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Buttons.py
Type: text/x-python-script
Size: 803 bytes
Desc: 2612874683-Buttons.py
Url : http://mail.python.org/pipermail/tutor/attachments/20060804/916ceb88/attachment.bin 


More information about the Tutor mailing list