Tkinter/WindowsXP - how to use checkbutton to toggle a label in GUI?

D

dudeja.rajat

Hi,

I've a checkbutton in my GUI application which I want to work as:

1. it should be un-ticked by default,
2. should display a label in Gui, by default,
3. when user ticks the check button this should the above label goes
off the screen and not longer is
displayed.

Please suggest how could I do this:

my code for the check button and label is :

#Check button
varTestAll = IntVar()
self.cbTestAll = Checkbutton(master, text="Test All", variable=varTestAll )

self.cbTestAll.grid(row = 12, column = 1, sticky = W, pady = 30, padx = 30)


#Label - Version under Test
self.lblVersionUnderTest = Label(master, \
text = "v2.1.5.0")
self.lblVersionUnderTest.grid(row = 15, \
column = 2, \
sticky = W, \
padx = 30)


Please suggest.

Thanks,
Rajat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top