Dynamically changing button text in python

marijuanated at gmail.com marijuanated at gmail.com
Sun Jan 15 01:37:39 EST 2006


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

def StopServer(self,event):
           curButton["text"] = "Start Server" #this does not  work




More information about the Python-list mailing list