Use of Indeterminate cellstate and how

By how, I mean how could the user set a checkbox as Indeterminate? I have never seen this in a GUI.

By Use, I mean if one can set it, what good is it? Not in the sense of having 3 instead of only 2 choices (normal Boolean), but really what is the advantage?

If I do a search for Indeterminate, I only found a few discussions.

Users don’t set checkboxes indeterminate.
The state is used mostly for “Select All” or similar collection-type state display.

Not to open a can of worms, but you can allow for the indeterminate state with declares or fancy trickery in Xojo code. But then you’re handing the user a loaded gun and asking them to point it at your software, but not fire.

Aah. That makes sense. I agree about the declares, That would be a mess.

[quote=401486:@Tim Parnell]Users don’t set checkboxes indeterminate.
The state is used mostly for “Select All” or similar collection-type state display.
[/quote]

I thought in a hierarchical listbox it was usually used to show that a parent has mixed state children.

That said I have an app where the user can cycle though all three checkbox states…

It’s an app users use to request analytical testing for various compounds. Checked means test for it, Intermediate means they expect the compound to be there but we don’t need to test for it ( that can effect which test method to use) and not checked if they don’t want us to test for it and don’t expect it to be present.

Yep, “similar collection-type state display” was my attempt to cover all scenarios where one single checkbox is attempting to display the state of a group of them.

How can a child have mixed state? I can see something having multiple parents, or is something else?
I haven’t played with hierarchical lists and this would be an incentive to play.

[quote=401494:@Arthur Gabhart]How can a child have mixed state? I can see something having multiple parents, or is something else?
I haven’t played with hierarchical lists and this would be an incentive to play.[/quote]

In that type of usage the parent’s state depends on the state of ALL it’s children

By mixed state children I mean that some of the children are checked and some are not.

The parent is checked if all the children are checked
The parent shows mixed state if some children are checked and some not
parent is unchecked if no children are checked…

Clicking on the parent checkbox either checks or unchecks all the children depending on it’s state before it is clicked

Just to be clear that behavior is not automatically supported by the Xojo listbox. You would have to implement it in code (not hard to do IMO)

  • karen

I think I understand. It would be useful for a person making choices in a hierarchical list. The list of choices is added to, well, some other place. Thanks

Usually, wikipedia have an explanation. Not always good or simple, but there is one.

https://en.wikipedia.org/wiki/Checkbox

Thanks. This simple Listbox now looks nice with indeterminate checks.

If SwDictColsLBox.CellCheck(1, 0) = True Then For i = 2 To SwDictColsLBox.ListCount-1 SwDictColsLBox.CellState(i, 0) = Checkbox.CheckedStates.Indeterminate Next End If