this is my code for entry widget & button click
# Amount entry here
textBoxAmount = Entry(win, textvariable=amount_entry)
textBoxAmount.grid(row=2, column=1)
# Deposit button here
buttonDeposit = tk.Button(text="Deposit", command=perform_deposit())
buttonDeposit.grid(row=2, column=2)
& my function perform_deposit
def perform_deposit():
'''Function to add a deposit for the amount in the amount entry to the
account's transaction list.'''
global account
global amount_entry
global balance_label
global balance_var
# Try to increase the account balance and append the deposit to the account file
#input = amount_text.get("1.0",END)
amount_entered = amount_entry.get()
print("amount entered : {}".format(amount_entry.get()))
print(amount_entered)
#balance_var= account.deposit(amount_entry.get())
print(balance_var)
Output is like
amount entered :
not getting textvariable value on putting 200 in text widget