hey guys, girls, others. i have a pop down widget and one of the options in the pop down screen is "Exit" which means quit. I want to know the code for clicking that "Exit" option and then it Quiting the whole program. here is my code for the pop down window with "Exit" option:

......

def createQuit(self):
self.mb = Menubutton(self, text="Quit", relief=FLAT, font=("Arial", 8))
self.mb.grid(row=0, column=3)
self.mb.menu = Menu(self.mb, tearoff=0)
self.mb["menu"] = self.mb.menu
self.exitVar = IntVar()
self.mb.menu.add_checkbutton(label="Exit", variable=self.helpTopicsVar)

......

If you don't know what im talking about please comment back!!

:]

No one is going to help you without knowing which f---- GUI toolkit you are using, and code posted between code tags --> click on the [ code ] icon at the top of the box, and post your code between the two code tags.

hey guys, girls, others. i have a pop down widget and one of the options in the pop down screen is "Exit" which means quit. I want to know the code for clicking that "Exit" option and then it Quiting the whole program. here is my code for the pop down window with "Exit" option:

def createQuit(self):
self.mb = Menubutton(self, text="Quit", relief=FLAT, font=("Arial", 8))
self.mb.grid(row=0, column=3)
self.mb.menu = Menu(self.mb, tearoff=0)
self.mb["menu"] = self.mb.menu
self.exitVar = IntVar()
self.mb.menu.add_checkbutton(label="Exit", variable=self.helpTopicsVar)

......

If you don't know what im talking about please comment back!!

:]

hello

here is the code, help me make a pop down window become a quit button!!

def createQuit(self):
        self.mb = Menubutton(self, text="Quit", relief=FLAT, font=("Arial", 8))
        self.mb.grid(row=0, column=3)
        self.mb.menu = Menu(self.mb, tearoff=0)
        self.mb["menu"] = self.mb.menu
        self.exitVar = IntVar()
        self.mb.menu.add_checkbutton(label="Exit", variable=self.helpTopicsVar)

i know how to in pygame, is that any help?

can you please give me the code for it in pygame and i'll go from there
thank you

self.mb["menu"] = self.mb.menu
        self.mb.menu.add_checkbutton(label="Exit", command=self.quit)

quit() stops the mainloop and destroy() destroys the parent window and it's descendants.

No one is going to help you without knowing GUI toolkit you are using

Didi you saw this?

ive got it working thanks for all the help

He is using Tkinter. I recognized the methods and keywords.

He is using Tkinter. I recognized the methods and keywords.

But not everyone uses/have ever use TKinter. One of them is myself.
Unless I see import TkInter, pack(), I will barely understand ;)

But not everyone uses/have ever use TKinter. One of them is myself.
Unless I see import TkInter, pack(), I will barely understand ;)

And I'm the same way with any GUI toolkit other than Tkinter, unless I see the import of course.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.