Is it possible to make a Tkinter yes/no messagebox with a checkbox, for something like 'Never ask me again'?
Or would I have to create another window, create my own Label
s and CheckButton
s, and basically create my own dialog?
Is it possible to make a Tkinter yes/no messagebox with a checkbox, for something like 'Never ask me again'?
Or would I have to create another window, create my own Label
s and CheckButton
s, and basically create my own dialog?
You should create your own dialog box then.
Here’s what you can do:
from tkinter import *
def popup():
popupWin = Toplevel()
popupWin.title(“Continue?”)
checkVariable = IntVar()
lbl = Label(popupWin, text=“Continue?)
lbl.pack()
btn2 = Button(popupWin, text=“Yes”)
btn2.pack()
btn3 = Button(popupWin, text=“No”)
btn3.pack()
checkBox = Checkbutton(popupWin, text=“Don’t ask again”, variable=checkVariable)
root = Tk()
btn = Button(root, text=Message Box, command=popup)
root.mainloop()