Re: [Tutor] Recursive Tkinter buttons

2005-02-27 Thread Jacob S.
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

Re: [Tutor] Recursive Tkinter buttons

2005-02-27 Thread Adam Cripps
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 >

Re: [Tutor] Recursive Tkinter buttons

2005-02-27 Thread Alan Gauld
> - 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

Re: [Tutor] Recursive Tkinter buttons

2005-02-27 Thread Michael Lange
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 > >

Re: [Tutor] Recursive Tkinter buttons

2005-02-26 Thread Adam Cripps
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

Re: [Tutor] Recursive Tkinter buttons

2005-02-25 Thread Michael Lange
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

Re: [Tutor] Recursive Tkinter buttons

2005-02-25 Thread Kent Johnson
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

Re: [Fwd: Re: [Tutor] Recursive Tkinter buttons]

2005-02-25 Thread Liam Clarke
*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,

[Fwd: Re: [Tutor] Recursive Tkinter buttons]

2005-02-24 Thread Ismael Garrido
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

Re: [Tutor] Recursive Tkinter buttons

2005-02-24 Thread Liam Clarke
> > 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

Re: [Tutor] Recursive Tkinter buttons

2005-02-24 Thread Adam Cripps
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) > >

Re: [Tutor] Recursive Tkinter buttons

2005-02-24 Thread Kent Johnson
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

Re: [Tutor] Recursive Tkinter buttons

2005-02-24 Thread jfouhy
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

Re: [Tutor] Recursive Tkinter buttons

2005-02-24 Thread Danny Yoo
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) >