Dynamically changing button text in python

marijuanated at gmail.com marijuanated at gmail.com
Sat Jan 14 17:05:53 CET 2006


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("<Button-1>",self.StopServer)

def StopServer(self,event):
           curButton["text"] = "Start Server"

Thanks,
Sundar




More information about the Python-list mailing list