I have an issue with accessing to Tkinter button objects. My idea that 2nd button is disabled if first button wasn't pressed.
If 1st button is pressed TopLevel window pops up with input fields.
When 3rd button is pressed works my function.And I'd like to change text of 4th button and destroy 3rd button. I can't do that from my function
self.win = tk.Toplevel()
self.win.geometry('350x200')
self.win.transient(root)
self.win.grab_set()
self.btn_cancel = tk.Button(master=self.win, text='Отмена',
command=self.win.destroy).grid(row=8, column=1)
self.btn_conn = tk.Button(master=self.win, text='Проверить',
command=self.entry_db_check).grid(row=8, column=0)
def entry_db_check(self):
<my code is here>
After all manipulation 2nd button must be active. I saw that it should work so
self.btn_cancel.destroy()
self.btn_conn['text']='OK'
Should I switch to frames instead of TopLevel window to make it work?