from Tkinter import *
master = Tk()
def ChangeOpt1():
Options.option_clear()
Options.option_add("Apple","Orange","Melon")
Options.update()
def ChangeOpt2():
Options.option_clear()
Options.option_add("Milk","Water","Juice")
Options.update()
Option1=Checkbutton(text="OPTION1",indicatoron=0,command=ChangeOpt1)
Option1.pack()
Option2=Checkbutton(text="OPTION2",indicatoron=0,command=ChangeOpt2)
Option2.pack()
variable = StringVar(master)
variable.set("You have to check an option")
Options= OptionMenu(master, variable, "You have to check an option")
Options.pack()
mainloop()
I want to do that when I clicked Option1, Options be cleaned and it has to add "Apple",etc.. When I clicked Options be cleaned and add "Milk" etc..
Thank you for help.