background color of buttons/menu items is black 
Author Message
 background color of buttons/menu items is black

I am new to tcl/tk, having just put up tcl7.0b3 and tk3.3b3.
(under ultrix 4.3, motif 1.2, using gcc 2.3.3 for tcl
and ultrix cc for tk (because gcc had a problem with TkTrig.c).

The demos seem to work just fine except for one thing:
then I move the mouse over menu items, the item under
the mouse goes all black.   when I move off,
it because readable again.  if I press over it, it works
as advertised.
thus it seems like the background color is changed to
black when the mouse moves over the menu item.

using the simple
   button .b -text "hello world!" -command exit
   pack .b
I get the same behaviour when I move the mouse
over that little button.

I have tried
   option add *Button.activebackground red
and other similar command prior to the above
button command, with no change.

(by the way, this is a color screen.)

So....I wonder what I need to change,
either in the make/compilation of tcl/tk
or at run time (or in .Xdefaults or whatever)
to fix this problem.

 - r

ps here is the error when I tried to make tk
with gcc (not that I think it has anything to do
with the above problem):

gcc -c -O -I. -I./../tcl7.0b3  -DHAVE_UNISTD_H=1    -DTK_LIBRARY=\"/usr/local/lib/tk\" tkTrig.c
tkTrig.c: In function `TkBezierScreenPoints':
tkTrig.c:829: fp_offset (32) or end_offset (-4) is less than zero.
make: *** [tkTrig.o] Error 1

make's with no error msg when I use ultrix cc.

Sat, 16 Mar 1996 03:45:05 GMT  
 background color of buttons/menu items is black
I have read a bit more of the book/manual and done a few experiments.
I learned how to configure the button after it is created and displayed.
with that I can use -activebackground/foreground
to get it to work for the buttons I create.
I have also learned how to set a default in .Xdefaults,
and that works for my button too (see top two lines below):

wish*Button*activeForeground:   navy
wish*Button*activeBackground:   yellow

wish*Menu*activeForeground:     navy
wish*Menu*activeBackground:     yellow
wish*MenuButton*activeForeground:       navy
wish*MenuButton*activeBackground:       yellow

however, using the commands above (where I was
guessing at class name to use) I still couldn't
get the menus and menu-items
in the demo to come out anything but black.
maybe I don't have the class name right?

(It was suggested maybe I am out of colormap
space.  Maybe, but then why would the example
button work if I set the defaults in .Xdefaults?
Also, I don't have any background pictures going,
or anything like that.
(I don't know how to see how much colormap
space I have used/free)).

What I really hope to find out is what
I have to do to the source codes to get
the built in defaults set right, so I don't have
to worry about .Xdefaults, etc.

thanks for any help.

Sat, 16 Mar 1996 06:24:16 GMT  
 [ 2 post ] 

 Relevant Pages 

1. TK42 Cascade menu's buttons background color

2. conflicts between button colors and background color

3. in canvas text item can background color be changed

4. Toolbar button background color

5. setting button background color

6. VA 4.0 Push Button Background color

7. Button's background color..

8. Color Button Background

9. Radio buttons on color background

10. Menu bar background color?

11. background color on push buttons

12. setting button background color


Powered by phpBB® Forum Software