Possibly. It would certainly be easy enough to add. I imagine that
we'd want PushButton, RadioButton, and Checkbox to respect this
property, if so.
In the meantime, I'm thinking that maybe Checkbox should also become
"select-only" when it is a member of a group.
What do others think?
On Aug 19, 2009, at 6:26 PM, Scott Lanham wrote:
That would be the behaviour I would expect from other toolkits.
Might it be an
option to set the behaviour on the Button.Group class?
On Thu, 20 Aug 2009 08:20:26 am Greg Brown wrote:
...then again, maybe I am wrong about this. Would it make more sense
to adopt the behavior that, if a toggle-style push button is part
of a
group, it behaves like a radio button and can't be deselected, but
when not in a group can be toggled on and off? I'm starting to think
that this is a good idea.
On Aug 19, 2009, at 6:16 PM, Greg Brown wrote:
I believe there are use cases for allowing the user to deselect a
toggled button. I can't think of a concrete one right now, but it's
along the lines of "you can choose A, B, C, or none of the above".
Radio buttons don't support it, but that's why our toggle-style push
buttons do.
On Aug 19, 2009, at 6:09 PM, Scott Lanham wrote:
For any program I have ever written if the toggle push buttons are
grouped
then one button in the group must always be selected with the only
exception
being the initial state of the group where none may be selected.
On Thu, 20 Aug 2009 08:04:56 am Greg Brown wrote:
I'm currently thinking of "selectOnly", but there may be better
options.
By the way, comments on this are welcome. Is this a feature that
is
worth adding to PushButton, or would it be better implemented
via a
custom subclass? Is this something that we think developers are
likely
to want to do often? I'm leaning towards "yes", but I'd like to
know
what others think.
G