Donald Arseneau wrote:
> "MartinLemburg@UGS" <martin.lemburg.ugs@gmx.net> writes:
>
> > I just realized some differences between the checkbuttons visualisation
> > in tcl 8.4 and 8.5.
>
> Hmmm... I don't get any clear picture from the TIP or the TclCore archive
> what need this new -tristate feature is intended to fill. The TIP's
> rationale is jargo-sales-speak:
>
> In order to meet more demanding requirements of todays complex graphical
> user interfaces...to be able to display a third state, i.e., both On and Off.
>
> I don't understand how something is both On and Off, and the explanation
> doesn't help me:
>
> This indicates the situation where a property has a particular value
> for some members of a selection set, but not others.
>
>
> The greatest utility for a third state that I can identify is a visual
> representation for the unknown state, when the value matches neither the
> On nor Off values. Unfortunately, the new -tristate does not satisfy
> that need, because it uses a particular value.
>
> A third, specific, state for the checkbutton could still be useful for
> some things. However, I see no utility for a tri-state radiobutton.
>
> --
> Donald Arseneau asnd@triumf.ca
If I didn't know better, I would swear that you've never used a
computer before!
I'll give you an example of tri-state check button outside of Tk. You
can do this regardless of which OS you're using; it's valid on Mac OS
X, KDE, and XP:
Open a file explorer
(XP: explorer, OS X: finder, KDE: konqueror).
Select a single file and using the RMB popup menu,
select "Properties".
(OS X, it's "Get Info" from the File pulldown if you
don't have a 3-button mouse)
Somewhere in the properties dialog box you'll find check
button(s) that represent some permission state of the
file (read-only, execute, etc.).
Now, select a different file and repeat. Same thing.
Now make a change so that you have two files with different,
say, read-only settings: one is read-only, and the other is not.
Next, select both files (Yes, multiple selection).
Open the properties dialog.
The dialog box on a multiple selection will display the property state
of all the selected items with a single checkbutton. If they are all
checked, it shows checked. If they are all unchecked, it shows
unchecked. If, however, some are checked and some aren't, the button
shows Tri-State. But here's the most important part: clicking on the
checkbutton will change the state of ALL items. This is a feature!
The general idea is that the checkbutton represents the state of an
object. The object comes from a set of objects. For convenience and
power, multiple selection is also represent with the single button.
The "power" part comes from the ability to act on the multiple
selection using the single button.
This is why the checkbutton was changed. It's not difficult to see how
the radiobutton can apply to multiple selection as well.
I will concede that the choice of "" as the default tristate value is
probably not ideal and it's not too late to change this. You can also
easily work around this with:
option add *Checkbutton.tristateValue "NONE"
So you don't have to edit each instance of the checkbutton.
Received on Sun Apr 30 02:27:49 2006