Tk Source Code

View Ticket
Login
Ticket UUID: 3593334
Title: checkbutton bitmap via config not highlighted on Aqua
Type: Bug Version: obsolete: 8.5.13
Submitter: reowen Created on: 2012-12-06 21:10:02
Subsystem: 03. [*button] and [label] Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Pending Last Modified: 2026-10-08 12:15:01
Resolution: Out of Date Closed By:
    Closed on:
Description:
On Aqua I observe that the behavior of checkbuttons and radiobuttons that use bitmaps is correct if the bitmap is supplied at creation, but not if supplied via config later. Here is test code that demonstrates the issue for checkbutton.

checkbutton .b
checkbutton .c -bitmap question
pack .c
.b config -bitmap question
pack .b

In the test code below observe that the top button changes appearance when checked and the bottom one does not. Also, the bottom button is smaller and appears to be missing its border  (which maybe part of the problem, but does not explain everything, since the top button turns gray all over when pressed).

Note that on Aqua the indicator is not shown if the button is a bitmap (unlike on unix), so the bitmap needs to change appearance to indicate the state of the button.
User Comments: serhiy.storchaka added on 2026-10-08 12:15:01:

Since [6d9ba34985] (Tk 8.6.4), buttons on macOS are no longer native NSButton controls whose type and flags were changed on configure. They are drawn with HITheme, and the button kind is recomputed on every configure, so a checkbutton or radiobutton configured with -bitmap later should look the same as one created with it. So this looks fixed. Kevin, could you confirm on macOS and close it as Out of Date?