I am trying the following code about python:
import tkinter
from tkinter import *
from tkinter.messagebox import askokcancel
class Quitter(Frame):
def _init__(self,parent=None):
Frame.__init__(self,parent)
self.pack()
widget=Button(self,text='Quit',command=self.quit)
widget.pack(side=TOP,expand=YES,fill=BOTH)
def quit(self):
ans=askokcancel('Verify exit',"You want to quit?")
if ans:Frame.quit(self)
if __name__=='__main__':Quitter().mainloop()
When executing it, I get a frame like this:
But where is the Quit button?