[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Modifying properties of several objects at the same time



Lars Clausen wrote:
> On 22 Oct 2003, Ben Hetland wrote:
>>If the property in question does NOT have the same value in all
>>selected objects, however, then the field should still be enabled
>>(i.e. modifiable), but doesn't show any real value. It could also be
>>"dimmed down" or something to visually aid in the concept that there
>>are really multiple values around. If the user does not touch this
>>setting at all, then the properties should remain unchanged in all
>>objects. But if the user sets a different value, then that will be set
>>in all objects of that type.
> 
> 
> This is the hard part.  Suggestions or even patches for this would be most
> welcome.

Maintaining a state with each widget I think is the clue to the 
solution here, a flag indicating "common value" or not. (Or did you 
mean that it's really hard to "dim down" a widget in GTK+?)

For simple things like check boxes, a tri-state selection to cycle 
through could be the visual behavior:
   [ ] Not selected
   [X] Selected
   [-] Different values

This is for example implemented in Windows Explorer's property box 
for files, where the last case show a check mark with a gray 
background. (And I have seen it used in several other 
implementations too.) Here, selecting the third case, simply 
indicates that the user doesn't want any of the objects to be 
changed regarding this specific property.

For more complicated things like texts and numbers, this isn't as 
simple. But I suggest the following:
   - initially the item is grayed and shows no value at all
     (empty field)
   - if the user types anything in there, then this will be
     the new value for _all_ selected objects of that kind
     (we don't care about the old values being different).
     The item's background turns white to reflect the change.
   - There could be an additional button or check box next
     to the field, allowing the user to revert his/her new
     value, upon clicking this would set the field back to
     its initial state.

We could also drop the last feature mentioned here, by asserting 
that if the user really did override some "multi-value", but
changed his or her mind afterwards, then one could simply
[Cancel] the whole properties box and bring it up again.

I also assert that the imaginable possibility of being able to set 
multiple values for the same field at the same time (when multiple 
objects are selected), is not really a feature that is needed. 
Because, if one really wants different values for some specific 
property, then one can simply bring up the properties dialog 
individually for each object in turn.


> 
> There's also a problem of figuring out which ones have the same setting,
> but that's mostly a problem of understanding properties.

In pseudo code (inspired by C++ STL):

it = select.begin();
common_value = true;
value = it->val;
for_each( ++it, select.end(),
    { if (value != it->val) common_value = false; } );
if (common_value)
    Display as normal: value
else
    Display blank with empty field


OK, just thinking "aloud" here, sharing some ideas. Anyone willing 
to elaborate are welcome to do so; otherwise I might try one day 
myself if I get the time (which I unfortunately get far to rarely...).


-+-Ben-+-





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK