Yay! Thanks for the tips Michael/Alan - works a treat, although I must
admit, I'm not sure what Lambda does.
Adam
Lambda is basically a function without a name that can be used inline.
Take for example, this code.
def funct(x):
return sin(x)
is the same as
funct = lambda x: sin(x)
There seems to
On Sun, 27 Feb 2005 16:06:32 -, Alan Gauld <[EMAIL PROTECTED]> wrote:
> > - however, when I click the button, I want self.showButton to know
> > which one of them was pressed. I've seen in other gui programming
> the
> > idea of an id or identifier - I can't see that here. Ideally, I
> would
>
> - however, when I click the button, I want self.showButton to know
> which one of them was pressed. I've seen in other gui programming
the
> idea of an id or identifier - I can't see that here. Ideally, I
would
> like to know the value of i in self.showButtons - but when I use
> self.showButtons
On Sat, 26 Feb 2005 19:48:25 +
Adam Cripps <[EMAIL PROTECTED]> wrote:
> On Fri, 25 Feb 2005 12:21:18 +0100, Michael Lange
>
> >
> > You see, in my example above I called the list "buttonlist" instead of
> > "button"; maybe this naming
> > helps avoid confusion .
> >
> > Best regards
> >
On Fri, 25 Feb 2005 12:21:18 +0100, Michael Lange
>
> You see, in my example above I called the list "buttonlist" instead of
> "button"; maybe this naming
> helps avoid confusion .
>
> Best regards
>
> Michael
Many thanks for the help here.
I got all my buttons displayed and stored in the
On Fri, 25 Feb 2005 20:19:15 +1300
Liam Clarke <[EMAIL PROTECTED]> wrote:
> >
> > for i in range(0,10):
> > print i
> > buttonlabel = "field " +str(i)
> > button[i].append = Button (text=buttonl
Adam Cripps wrote:
button = []
for i in range(0,10):
print i
buttonlabel = "field " +str(i)
button[i].append = Button (text=buttonlabel)
button[i].grid(column=3, row = i+3
*click* Oh yeah. What you said. Oops. :\
Liam
On Fri, 25 Feb 2005 05:53:54 -0200, Ismael Garrido
<[EMAIL PROTECTED]> wrote:
> Sent only to Liam... Forwading..
>
> Original Message
> Subject: Re: [Tutor] Recursive Tkinter buttons
> Date: Fri,
Sent only to Liam... Forwading..
Original Message
Subject: Re: [Tutor] Recursive Tkinter buttons
Date: Fri, 25 Feb 2005 05:45:00 -0200
From: Ismael Garrido <[EMAIL PROTECTED]>
To: Liam Clarke <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
<[EMAI
>
> for i in range(0,10):
> print i
> buttonlabel = "field " +str(i)
> button[i].append = Button (text=buttonlabel)
> button[i].grid(column=3, row = i+3)
>
> The current
On Thu, 24 Feb 2005 21:26:29 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Adam Cripps wrote:
> > I'm trying to create recursive Tkinter buttons with:
> >
> > for i in range(0,10):
> > print i
> > buttonlabel = "field " +str(i)
> >
Adam Cripps wrote:
I'm trying to create recursive Tkinter buttons with:
for i in range(0,10):
print i
buttonlabel = "field " +str(i)
button[i] = Button (text=buttonlabel)
button[i].grid(c
Quoting Danny Yoo <[EMAIL PROTECTED]>:
> I think that only widgets that are designated as "containers" can
> contain other widgets. A Frame is an example of a widget that can contain
> other widgets:
This is (I think) true; but the root can also contain widgets, and it is the
default if no other
On Thu, 24 Feb 2005, Adam Cripps wrote:
> I'm trying to create recursive Tkinter buttons with:
>
> for i in range(0,10):
> print i
> buttonlabel = "field " +str(i)
> button[i] = Button (text=buttonlabel)
>
14 matches
Mail list logo