This is not necessarily the current version of this TIP.
| TIP: | 110 |
| Title: | Add a Tristate Mode to the Checkbutton and Radiobutton |
| Version: | $Revision: 1.5 $ |
| Author: | Brian Griffin <bgriffin at model dot com> |
| State: | Draft |
| Type: | Project |
| Tcl-Version: | 9.0 |
| Vote: | Pending |
| Created: | Tuesday, 01 October 2002 |
This TIP proposes adding a third value (tristate) to the -state option of the checkbutton and radiobutton widgets.
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 the checkbutton 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 multiple selection, but not others.
The change would add a the state "tristate" to the -state option of the checkbutton and radiobutton widgets. The widget would then display the check/dot mark (as appropriate) along with a "grayed" background. When the checkbutton or radiobutton is invoked (i.e. clicked on) it would behave exactly as it does currently with the addition of modifying the -state from "tristate" to "normal".
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.
The original proposal is confusing in that it mixes state (normal, disabled) with values (on, off). The original intent is to give the widget a display presentation that represents a third value which is both on and off at the same time, also known as an indeterminate value. To make this clear now and for future users of the checkbutton, I amend the proposed changes to be:
Identify a third, platform specific, presentation (e.g. check with grayed background) to represent the tristate or indeterminate value,
Add the option "-tristatevalue" to specify the match value only. The default value of this option will be {},
Change the behavior to display the indeterminate or tristate presentation when either the associated variable's value matches the -tristatevalue or when the -tristatevalue is empty ({}) and the associated variable's value does not match either the -onvalue or the -offvalue, and
Add the option "-tristateimage" to specify an image to display (in place of the image option) when the checkbutton has the indeterminate value (as defined above.)
This document has been placed in the public domain.
This is not necessarily the current version of this TIP.