TIP #110: ADD A TRISTATE MODE TO THE CHECKBUTTON AND RADIOBUTTON ================================================================== Version: $Revision: 1.12 $ Author: Brian Griffin State: Final Type: Project Tcl-Version: 8.5 Vote: Done Created: Tuesday, 01 October 2002 URL: https://tip.tcl-lang.org110.html Post-History: ------------------------------------------------------------------------- ABSTRACT ========== This TIP proposes adding a third value (tristate) to the checkbutton and radiobutton widgets and corresponding display. RATIONALE =========== In order to meet more demanding requirements of todays complex graphical user interfaces, it would help add to the functionality of the basic checkbutton and radiobutton widgets. To support using checkbuttons and radiobuttons along with multiple selection, it is necessary for these buttons to be able to display a third state, i.e., both On and Off. This indicates the situation where a property has a particular value for some members of a selection set, but not others. PROPOSED CHANGE ================= The change would add a third "tristate" value to current On Off values of the checkbutton and radiobutton widgets. The widget would then display the check/dot mark (as appropriate) along with a "grayed" background, for example. When the checkbutton or radiobutton is invoked (i.e. clicked on) it would behave exactly as it does currently, setting the variable to the On value. There is a concern that the Unix version of these widgets do not have a sufficiently different appearance when in the tristate state compared with the On and Off states. This issue is addressed in [TIP #109]. PROPSAL SPECIFICS =================== 1. Identify a third, platform specific, presentation (e.g. check with grayed background) to represent the tristate value, 2. Add the option "-tristatevalue" to specify the match value only. The default value of this option will be "{}", 3. Change the behavior to display the indeterminate or tristate presentation when the associated variable's value matches the -tristatevalue, and 4. Add the option "-tristateimage" to specify an image to display (in place of the image option) when the checkbutton or radiobutton has the tristate value (as defined above.) COPYRIGHT =========== This document has been placed in the public domain. ------------------------------------------------------------------------- TIP AutoGenerator - written by Donal K. Fellows