1

I am trying to make a Drop Down Menu of colors. Red Green Blue Yellow. I want the words inside the option box to be colored with their respected name. So the when the user clicks the arrow to open the optionMenu, Option red will have red letters. blue will have blue letters and so forth.

Is this Possible?

Thanks.

Daniel
  • 91
  • 1
  • 4

2 Answers2

1

So you just have to use OptionMenu.entryconfig(*index of item*, background = *color)

m.entryconfig(0, background="GREEN")
m.entryconfig(1, background = "RED")
nbro
  • 15,395
  • 32
  • 113
  • 196
Daniel
  • 91
  • 1
  • 4
0

Try using the fg(or foreground) and bg(or background) options. If a is the menu, use: a.entryconfig( optionindex , bg=" color_name " ) for the background, and a.entryconfig( optionindex , bg= " color_name " ) for the foreground.

dccsillag
  • 919
  • 4
  • 14
  • 25