Re: Dynamically changing button text in python

2006-01-15 Thread marijuanated
Thank you very much.I had actually misinterpreted the "textvariable" property for some kind of "storage for each Button". I am actually developing an app where multiple buttons have a single event handler.So i thought the "textvariable" property might be used to store some info about each of the Bu

Re: Dynamically changing button text in python

2006-01-15 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > The problem is once i set the textvariable property of the button,i > cannot change the text.For example, > > curButton = Button(root,text="Stop Server",textvariable="this") what made you think that setting textvariable to "this" would be a good idea? the textvariable

Re: Dynamically changing button text in python

2006-01-15 Thread Paul Rubin
[EMAIL PROTECTED] writes: > The problem is once i set the textvariable property of the button,i > cannot change the text.For example, > > curButton = Button(root,text="Stop Server",textvariable="this") 1. I don't think you can use text and textvariable at the same time. 2. I don't think you're us

Re: Dynamically changing button text in python

2006-01-14 Thread marijuanated
The problem is once i set the textvariable property of the button,i cannot change the text.For example, curButton = Button(root,text="Stop Server",textvariable="this") curButton.bind("",self.StopServer) def StopServer(self,event): curButton["text"] = "Start Server" #this does not wor

Re: Dynamically changing button text in python

2006-01-14 Thread Paul Rubin
[EMAIL PROTECTED] writes: > for example,can we do something like this: > > curButton.bind("",self.StopServer) > > def StopServer(self,event): >curButton["text"] = "Start Server" Yes. -- http://mail.python.org/mailman/listinfo/python-list

Dynamically changing button text in python

2006-01-14 Thread marijuanated
Hi all, I am wondering if i could change a button text dynamically in its handler. for example,can we do something like this: curButton.bind("",self.StopServer) def StopServer(self,event): curButton["text"] = "Start Server" Thanks, Sundar -- http://mail.python.org/mailman/listinfo