Tk Optionmenu foreground colors

G

gilgames

May be somebody could help me out.

I use Tk the version from 2004. I have to make a change which allows
black background (same people see it better). I was successful with all
the widgets, except Optionmenu. I can change the -background option, but
the -foreground (text color) is always black or some kind of gray.
-activeForeground is rejected when the program is loaded. I see the
highlighted foreground (when the cursor is over the widget or selection)
but do not see options in not highlighted state.

here is the command I use


$parwidget[$i]->Optionmenu(-options=>\@optarray,-textvariable=>$myvariable,
-takefocus=>1,-font=>$myfont,
-background=>"black",-foreground=>"white",
-command=>sub{"myfunc()")});

Everything works fine since years except the -foreground color

Thanks in advance
 
G

gilgames

<<
I use Tk the version from 2004. I have to make a change which allows
black background (same people see it better). I was successful with all
the widgets, except Optionmenu. I can change the -background option, but
the -foreground (text color) is always black or some kind of gray.
-activeForeground is rejected when the program is loaded. I see the
highlighted foreground (when the cursor is over the widget or selection)
but do not see options in not highlighted state.

The above is my problem. I found some halfway resolution. If I edit
Optionmenu.pl in site/lib/Tk folder inserting

-foreground => [['SELF', 'CHILDREN'], undef, undef, undef],



line to $w->ConfigSpecs( list, the the color of the button can be
changed. However the popupmenu color is still gray

Any idea is appreciated

laszlo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top