Tk Source Code

View Ticket
Login
Ticket UUID: 02a69449b56aa712e19ad8a52aeb0053ef892c2a
Title: Wrong database names for tk::spinbox
Type: Bug Version: core-8-6-branch
Submitter: fvogel Created on: 2019-12-10 20:57:33
Subsystem: 07. [entry] Assigned To: fvogel
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2019-12-14 20:12:21
Resolution: Fixed Closed By: fvogel
    Closed on: 2019-12-14 20:12:21
Description:

This was reported in comp.lang.tcl and the root cause was analyzed by Csaba Nemethi:

According to the spinbox man page, the database name for the -buttonbackground option should be buttonBackground. Unfortunately, the implementation erroneously uses "Button.background" instead. This is no valid database name, because the period has a well-known special meaning. This is definitely a bug in Tk.

BTW: "Button.cursor" (instead of buttonCursor, for the -buttoncursor option) and "Button.relief" (instead of buttonDownRelief and buttonUpRelief, for the -buttondownrelief and -buttonuprelief options) are equally invalid database names.

Test script:

package require Tk
option add *Spinbox.buttonBackground red
pack [spinbox .sb]

The red backgound for the up/down buttons is not shown.

User Comments: fvogel added on 2019-12-14 20:12:21:
Merged to core-8-6-branch and trunk.

fvogel added on 2019-12-10 20:59:23:

Fixed by [78c9e8f74c].