Tk Source Code

View Ticket
Login
Ticket UUID: 2321708
Title: radiobutton (and checkbutton) behavior question
Type: Bug Version: obsolete: 8.6a4
Submitter: lvirden Created on: 2008-11-21 16:51:29
Subsystem: 03. [*button] and [label] Assigned To: fvogel
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2018-03-04 21:58:57
Resolution: Fixed Closed By: fvogel
    Closed on: 2018-03-04 21:58:57
Description:
The documentation for radiobutton and checkbutton has, for quite some time, included a paragraph to this effect:

     Command-Line Name:-selectcolor
     Database Name:  selectColor
     Database Class: Background

          Specifies a background color to use when the button is
          selected.  If indicatorOn is true then the color applies to
          the indicator.  Under Windows, this color is used as the
          background for the indicator regardless of the select state.
          If indicatorOn is false, this color is used as the back-
          ground for the entire widget, in place of background or
          activeBackground, whenever the widget is selected.  If
          specified as an empty string then no special color is used
          for displaying when the widget is selected.

That isn't exactly what Tk is doing, as of Tk 8.5 I think.

What happens on Solaris is now the same thing as happens on Windows - the background is used regardless of the select state. 

The original behavior - using the color only when the item is selected - is really the preferred behavior. 

Of course, an enhancement to provide a -deselectcolor and a -tristatecolor setting would probably be even better.
User Comments: fvogel added on 2018-03-04 21:58:57:
Merged to core-8-6-branch and trunk.

fvogel added on 2018-02-18 21:48:11:

Ahem, sorry, [338335df] fixes [95fe57fb47], so that the correct fix in fact is this diff.


fvogel added on 2018-02-18 21:42:58:

The ticket pointed by lvirden below, i.e. [1083838fff], really received a fix as this ticket says, this fix was [1f456fcb].

However the above fix only changed the man page for checkbutton, it forgot the radiobutton. [95fe57fb47] now bridges this gap.


lvirden added on 2010-02-19 22:25:16:
I notice that https://sourceforge.net/tracker/index.php?func=detail&aid=1083838&group_id=12997&atid=112997 , which was quite some time ago, is listed as closed and fixed, however the man page change recommended in that ticket doesn't appear to have made it into a release.