pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: PushButton in Toggle Mode
Date Wed, 19 Aug 2009 23:26:07 GMT
I just checked in the simpler change of simply having PushButton  
always behave like a radio button when it is part of a group. Anything  
else just feels overdesigned - like we're catering to theoretical use  
cases that don't really exist.

So:
- Radio buttons always select when pushed
- Checkboxes always toggle when pushed (though they may cycle through  
three states if tri-state)
- PushButtons always select when part of a group, and cycle through  
two states otherwise (push buttons can be tri-state, but the user  
can't actually cycle to the mixed state)


On Aug 19, 2009, at 7:09 PM, Greg Brown wrote:

> After giving this some thought, I think the best approach would be  
> to add the "selectOnly" flag to PushButton. I like giving the Button  
> subclass responsibility for deciding how to handle its selection  
> state, rather than relegating it to the Group and requiring all  
> button types to respect it.
>
> This way, a PushButton can be configured to behave either like a  
> radio button or like a checkbox when it is in a group (currently, it  
> behaves like a checkbox only).
>
>
> On Aug 19, 2009, at 6:20 PM, 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
>>>>
>>>
>>
>


Mime
View raw message