I want to show clear text in the following code if I check a checkbox:
import tkinter as tk
from tkinter import *
root = tk.Tk()
check_btn_var = tk.IntVar()
def check_btn():
# function to change show value of 'password_entry'
password_entry = Entry(root, font=("Courier", 14), show="*")
password_entry.grid(row=3, column=1, columnspan=3, padx=2, pady=2, sticky=W)
password_checkbutton = Checkbutton(root, text="show password", variable=check_btn_var, onvalue=1, offvalue=0, command=check_btn)
password_checkbutton.grid(row=3, column=2, padx=38, pady=2, sticky=W)
root.mainloop()
for example:-
when we fill password in any website and we have an option to
show password. that is what I want to do with this code