Feb-07-2022, 03:41 PM
One way to get around that would be to use
lambda
to sendpssw.get ()
toSave
as an argument. See if this helps.import tkinter as tk from tkinter.ttk import * window = tk.Tk() def Adder(): AddingWindow = tk.Toplevel(window) AddingWindow.geometry("400x400") Label(AddingWindow, text="Mail/Username", width="20", font="Calibri 22 bold").pack() name = Entry(AddingWindow, width=50) name.pack() Label(AddingWindow, text="Password", width="20", font="Calibri 22 bold").pack() passw = Entry(AddingWindow, width=50) passw.pack() Add = Button(AddingWindow, text="Add", width="20") Add.config (command = lambda : Save (passw.get())) Add.pack () def Save(Password): print(Password) window.geometry("500x500") greeting = tk.Label(text="Password Manager: Developed by KEIKAS", font="Calibri 20 bold") AddB = tk.Button(text="Add", width="20",height="2",bg="green", command=Adder) AccessB = tk.Button(text="Access", width="20",height="2",bg="blue") RemoveB = tk.Button(text="Remove", width="20",height="2",bg="red") greeting.pack() AddB.pack() RemoveB.pack() AccessB.pack() window.mainloop()