Tk Source Code

View Ticket
Login
Ticket UUID: 1032907
Title: menubutton fg color changes unexpectedly under Aqua Tk
Type: Bug Version: obsolete: 8.4.7
Submitter: reowen Created on: 2004-09-22 19:57:29
Subsystem: 11. Aqua Menus Assigned To: aku
Priority: 4 Severity: Minor
Status: Pending Last Modified: 2026-09-25 14:21:27
Resolution: None Closed By: nobody
    Closed on:
Description:
I noticed the following bizarre behavior under MacOS X  
10.3.4 with Tcl/Tk Aqua 8.4.7: if I have a button using a 
gray50 bitmap and I change its foreground color, the color 
of the text of all menubuttons on the same toplevel also 
changes to that same new color!

Here is a procedure to see this:

menubutton .mb -text sometext
pack .mb
button .b -bitmap gray50
pack .b
.b configure -fg blue

* Click on the title bar of the topevel window to bring it to 
the front.
* Move the mouse over the menubutton (without clicking!)
* Observe that the color of the menubutton's text changes 
to blue! Why???

I sure hope this is a bug and not a feature. I can't imagine 
why this behavior should be normal, and I don't see this 
strange behavior under unix (nor, I think, under some 
earlier versions of aqua Tcl/Tk but I've not tried reverting to 
find out for sure).

On the other hand, under aqua Tk I've not found any 
*proper* way to change the color of the text or the 
background for a menubutton, which has been a great 
source of grief. Pity that this bug doesn't make a useful 
workaround for that problem.
User Comments: kevin_walzer added on 2026-09-25 14:21:27:
Issue not present on tip of Tk 9.1.

serhiy.storchaka added on 2026-09-25 11:49:38:

The Aqua menubutton drawing code has been replaced since 8.4: the text is now drawn with the menubutton's own -foreground/-activeforeground GCs over a native popup button. Can someone on macOS check whether the script in the description still shows the problem with 8.6.18 or 9.0?