Re: number box class from NSTextField
Re: number box class from NSTextField
- Subject: Re: number box class from NSTextField
- From: Quincey Morris <email@hidden>
- Date: Mon, 22 Jun 2009 13:16:45 -0700
On Jun 22, 2009, at 11:19, Stephen Blinkhorn wrote:
On 22 Jun 2009, at 09:11, Graham Cox wrote:
The standard way to handle this is to pair an ordinary text field
with a stepper control (and maybe a slider, if you have space). The
stepper allows the user to spin the value up or down while the text
field allows them to type a value.
I'm using the stepper approach for now but neither me nor my users
like it much. The slider idea could be useful but of course GUI
space is at a premium which is one of the reasons I'm looking at
alternatives.
There are two really basic flaws in the scroll-wheel-over-the-text-
field approach:
(1) It attaches *invisibly* different behavior to a well-known UI
object. The fact that there are plenty of examples of this doesn't
mean it's not an abuse of users' goodwill, just that it's the least
obnoxious abuse that the developer could think of at the time.
(2) *Nested* wheel-scrolling behavior can be a frustration for users,
because it forces them to stop and think what the effect of using the
scroll wheel is going to be. This is just exacerbated when some of the
behavior is "harmless" adjustment of the UI (e.g. scrolling) and some
is real change to the data model. That means the price of the users
missing the scroll target by a pixel is pretty high.
However, since have (at least) a fair justification for wanting to
adjust numeric values via the scroll wheel, and you've already
committed view real-estate to steppers, I'd suggest you:
(a) Attach the scroll-wheel behavior to the stepper, not to the text
field. That may involve subclassing the stepper control or the stepper
cell.
(b) Give the stepper a different visual appearance. The obvious choice
would be to replace the up/down arrows with the top and bottom halves
of a thumbwheel image, and have the thumbwheel image animate nicely
when the value is being changed. That would be doable by subclassing
the stepper cell.
Chances are, there's already an implementation of something like this
out there that you could adapt.
FWIW.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden