Experiment no.08 from tkinter import * chk.grid(column=0, row=4) from tkinter.ttk import *
window = Tk() lbl = Label(window, text="Enter password") window.title("Welcome to GUI Programming")
lbl.grid(column=0, row=10)
lbl2 = Label(window, text="") window.geometry('350x200')
lbl2.grid(column=0, row=1)
lbl = Label(window, text="Select Subjects") txt = Entry(window,width=20, show='*') lbl.grid(column=0, row=0)
chk_state1 = BooleanVar() chk_state1.set(False) #set check state chk_state2 = BooleanVar() chk_state2.set(False)
txt.grid(column=1, row=10)
def clicked(): lbl2.configure(text="Password is: "+str(txt.get())) lbl2.grid(column=0, row=19)
chk_state3 = BooleanVar() chk_state3.set(False)
btn = Button(window, text="Show Password", command=clicked) btn.grid(column=0, row=18)
chk = Checkbutton(window, text='AM-IV', var=chk_state1)
window.mainloop()
chk.grid(column=0, row=1)
output: chk = Checkbutton(window, text='COA', var=chk_state1) chk.grid(column=0, row=2)
chk = Checkbutton(window, text='AOA', var=chk_state1) chk.grid(column=0, row=6)