|
This is basically a modified resize mode, so it should behave
mostly like your normal resize -- by dragging a corner or
edge of the object to be resized. Consider using a modifier key
to differentiate it from the normal resize, e.g., the user holds
down the "Shift" key while dragging. Or if you think most users
are always going to want the constraint, make it the default
resize operation. Word does this with images.
As the user drags the mouse cursor, a resize box should
be drawn to show the new dimensions. Whatever kind of
constraint you're imposing, show it via the box.
There are many reasons why one might constrain a resize. Some
variations on a theme:
- Leave the object's geometric center in the same place, and
resize symmetrically around it.
- Resize by units larger than pixels. For instance,
a GUI builder may require that a list box's height be some
integral number of text lines. (Probably not a good idea in
general, but if that's what you've got to work with, the UI
should reflect that.) Or you may be working with a
snap-to-grid. In any case, the resize box should "jump" from
one size to the next.
- An object may have a size limit. Once the user has hit
the size limit in one dimension or the other, don't let the
resize box expand (or contract, as the case may be) any further
in that dimension.
Alan Cooper describes this in his book About Face,
although the technique is older than that. He generalizes the
concept and calls it "constrained drag."
|