from tkinter import *
class GameBoard(Frame):
def __init__(self):
Frame.__init__(self)
self.master.title("test")
self.grid()
#button frame
self.__buttonPane = Frame(self)
self.__buttonPane.grid()
#buttons
self.__buttonA1 = Button(self.__buttonPane,text = "A1",command = self._close)
self.__buttonA1.grid()
def _close(self):
GameBoard().destroy()
def main():
GameBoard().mainloop()
main()
仕事の近くで関数を作成するにはどうすればよいですか?