views:

22

answers:

0

I have the following Tkinter option menu and have two questions.First, how do I change the background color of the selected option in the popupmenu? Secondly, how do I add separators to this menu?

Snippet:

TL.selectedP = Tkinter.StringVar()
        TL.opt1 = Tkinter.OptionMenu(TL.separator1, TL.selectedP,'Normal', 'White','Black', 'Blue', 'Steel Blue','Green','Light Green','Yellow','Orange' ,'Red','Custom',command=self.G)
        TL.opt1.config(fg="black",bg="grey90",activebackground="grey90",activeforeground="black",
                        anchor="center",relief="raised",direction='right',font=('Arial', 10))
        TL.opt1.grid(column=0,row=1,sticky='EW',columnspan=1,padx=20,ipadx=20)
        TL.selectedP.set('Normal')