From: SourceForge.net <no...@so...> - 2010-04-11 22:50:40
|
Patches item #1530276, was opened at 2006-07-28 03:13 Message generated for change (Settings changed) made by jenglish You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312997&aid=1530276&group_id=12997 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 03. [*button] and [label] Group: None >Status: Open >Resolution: None Priority: 9 Private: No Submitted By: Koen Danckaert (danckaert) Assigned to: Donal K. Fellows (dkf) Summary: checkbutton selectcolor not honoured (unix only) Initial Comment: When a checkbutton without indicator (-indicatoron 0) is selected, its background should be changed to its -selectcolor option. Currently this happens only when the mouse cursor is not over the checkbutton, i.e. when it is not active. This is very strange and it is not according to the documentation of -selectcolor, which says: "If indicatorOn is false, this color is used as the background for the entire widget, in place of background or activeBackground, whenever the widget is selected." Attached patch brings the code in line with the documentation. Note: this also applies to radiobuttons. ---------------------------------------------------------------------- >Comment By: Joe English (jenglish) Date: 2010-04-11 15:50 Message: This seems to have caused a regression: the manpage also states that "... if [-selectcolor] specified as an empty string then no special color is used for displaying when the widget is selected", but if you do so it leads to an error: pack [checkbutton .cb -indicatoron false -text "Test" -selectcolor ""] # Move mouse over checkbutton; ==> Error unknown color name "" while executing "winfo rgb $w [$w cget -selectcolor]" (procedure "tk::CheckEnter" line 23) invoked from within "tk::CheckEnter .cb" (command bound to event) ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2009-10-23 17:13 Message: Backported to 8.5; I can't be bothered to go further back. Note that checkbuttons are indeed handled in scripts, but radiobuttons are done in C code. Oh what a tangled web we weave without the style engine to support us... ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2009-10-23 17:02 Message: applied a variant to the HEAD ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2009-10-23 15:45 Message: Experiment indicates that indeed it works well for radiobuttons, but not so well for checkbuttons. It'll be better to tackle the latter through adjusting the class bindings (we need to synthesize an active&selected color...) ---------------------------------------------------------------------- Comment By: Koen Danckaert (danckaert) Date: 2009-10-23 09:05 Message: Best way to see that the current behaviour is strange, is with the old 8.4 look & feel. Just do pack [checkbutton .c -text foo -indicatoron 0] in wish8.4 and look at the background color when you check the button. ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2009-10-23 08:43 Message: Certainly sounds like the right thing to do for radiobuttons; need to think a little more about checkbuttons... ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2009-01-06 05:56 Message: Issue prio raised following prompting, and noting that the patch has been tested "in service" by Jos Decoster. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312997&aid=1530276&group_id=12997 |