Skip to content Skip to sidebar Skip to footer

How To Change 'show' Value In 'entry' Method Of Tkinter

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():

Solution 1:

Check if the checkbox has been checked. If it has been checked then set show="" else show='*'

def check_btn():

    if check_btn_var.get():
        password_entry['show'] = "" # or password_entry.config(show='')

    else:
        password_entry['show'] = "*"
    

Post a Comment for "How To Change 'show' Value In 'entry' Method Of Tkinter"