How to get Checkbutton Handle?

Laura Creighton lac at strakt.com
Sat Mar 23 11:07:29 EST 2002


> This seems like an easy question, but that answer has proven fairly
> difficult. I am simply trying to get the checkbutton handle back,
> exactly the same way I do it with the Label or RadioButtons, etc. I am
> doing it this way:
> 
> self.allCheck = IntVar()
> 		self.allButton = Checkbutton(albutFrame, text="Check to select all
> test scenarios", state=NORMAL, anchor=W,
> 					variable = self.allCheck, command = self.select
> All).pack()
> 		print "allButton location is ", self.allButton
> 
> But I don't get the handle back. All I get is this:
> 
> allButton location is  None
> 

Yes.  Storing the result of packing is useless as you just found out, because
the pack method returns None.

Laura Creighton





More information about the Python-list mailing list