| Author |
tk_optionMenu menu colors
|
|
| Dmurray2 2004-07-23, 8:57 am |
| I can't seem to set the background and foreground colors of the popup menu
created by tk_optionMenu. Here is my code:
tk_optionMenu .gui.cycle cycle "00Z" "06Z" "12Z" "18Z"
gui.cycle configure -borderwidth 1 -activebackground white -background
blue -foreground white -highlightbackground blue
This configures the menu button, but the menu itself comes up with a grey
background and black foreground. I would like for it to use the same
background and foreground scheme as the button. Can anyone help me out?
Thanks
| |
| Bryan Oakley 2004-07-23, 3:58 pm |
| Dmurray2 wrote:
> I can't seem to set the background and foreground colors of the popup menu
> created by tk_optionMenu. Here is my code:
>
> tk_optionMenu .gui.cycle cycle "00Z" "06Z" "12Z" "18Z"
> gui.cycle configure -borderwidth 1 -activebackground white -background
> blue -foreground white -highlightbackground blue
>
Reread the tk_optionMenu man page and you'll see that it states the
command returns the path of the menu. For example:
set menu [tk_optionMenu .gui.cycle cycle "00Z" "06Z" "12Z" "18Z"]
$menu configure -borderwidth 1 ...
| |
| Dmurray2 2004-07-23, 3:58 pm |
| Thanks for the help. I'm kind of new to Tk and I didn't realize that you
could configure anything that has a path.
|
|
|
|