Hello all,

A script should open an application with two buttons visible. When Hello button is pressed a new button is gridded into the row number 1 and Hello button to be deactivated. When this new button is pressed it should delete itself off the grid and reactivate hello button but it does not do it. Any ideas?

Please check the video to see it in action.

Code:
from tkinter import *
 
class Application(Frame):
    def __init__(self, master=None):
        self.master = master
        self.master.geometry('300x100+10+10')
        Frame.__init__(self, master)
        self.pack()
        self.createWidgets()
 
    def new_button(self):
        print("enable_b")
        self.hi_there.config(state=ACTIVE)
        self.new_button.grid_remove()
 
    def say_hi(self):
        print("hi there, everyone!")
        self.new_button = Button(self)
        self.new_button["text"] = "New BTN"
        self.new_button.grid(row=1,column=0)
        self.hi_there.config(state=DISABLED, command=self.new_button)
 
    def createWidgets(self):
        self.QUIT = Button(self)
        self.QUIT.config(text="QUIT",fg="red",command=self.quit)
        self.QUIT.grid(row=0,column=1)
        self.hi_there = Button(self)
        self.hi_there["text"] = "Hello",
        self.hi_there["command"] = self.say_hi
        self.hi_there.grid(row=0,column=0)
 
    def quit(self):
        self.master.destroy()
 
def testit(): 
    root = Tk()
    app = Application(master=root)
    app.mainloop()
 
if __name__ == '__main__':
    testit()