Найти - Пользователи
Полная версия: Как сделать отключение show
Начало » Центр помощи » Как сделать отключение show
1
Fedy1661
Как изменить show на обычный текст?
При изменении на DISABLED всё слово изменяется на букву D, хелпаните.
 #coding: utf-8
from tkinter import *
from tkinter import messagebox
import pickle
passs = 0
loggg = 0
root = Tk()
root.geometry("300x500")
root.title("Вход/регистрация")
def log ():
    global e2
    global e3
    global b2
    global e  
    t = Label(root, text = "Зарегистрируйтесь для входа", font="Arial 16")
    t.pack()
    t1 = Label(root, text = "Логин:", font="Arial 10")
    t1.pack()
    e = Entry()
    e.pack()
    t2 = Label(root, text = "Пароль:", font="Arial 10")
    t2.pack()
    e2 = Entry(show="*")
    e2.pack()
    t3 = Label(root, text = "Пароль:", font="Arial 10")
    t3.pack()
    e3 = Entry(show="*")
    e3.pack()
    reg = Button(root, text="Зарегистрироваться", overrelief="sunken", command = lambda: save())
    reg.pack()
    b2 = Button(root, text="Раскрыть пароль", command = lambda: offe(), overrelief="sunken")
    b2.pack()
def offe():
    e2.config(show=DISABLED)
    e3.config(show=DISABLED)
    b2.config(command = lambda: offe2(), text="Раскрыть пароль")
def offe2():
    e2.config(show="*")
    e3.config(show="*")
    b2.config(command = lambda: offe(), text = "Скрыть пароль")
log()
root.mainloop()
Fedy1661
изменил show= DISABLED на show=“” Проблема решена.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB