tags:

views:

356

answers:

2

How would I go about implementing something along the lines of "scrubby sliders", like in Photoshop and quite a few other image-processing applications?

They are slightly hard to describe.. basically you have a regular numeric input-box, but you can click-and-hold the mouse button, and it functions like a slider (until you release). If you click in the box, you can select text, edit/paste/etc as usual.

The Photoshop docs describe it, and I put together a quick example video (an example of the sliders in Shake)

Another similar implementation would be the jog-wheel in Final Cut Pro, which functions similarly, without the numeric readout being underneath.

I can't seem to find any mention of implementing these, although there is probably alternative names for this. It is for a OS X 10.5 Cocoa application.

It is for a colour-grading application, where a user might need to make tiny adjustments (0.001, for example), to huge adjustments (say, -100 +100) on the same control. A regular slider isn't accurate enough over that range of value.

Copy-and-pasting values into the box would be a secondary concern to scrubbing the values, and the Photoshop/Shake setup really well. The unobviousness of the control is also of a low concern, as it's not a "regular desktop application"

+4  A: 

I've encountered those. They suck, because they prevent the user from dragging to select the text of the number.

A better idea would be a miniature slider beneath the field that expands to a full-size slider when the user holds down the mouse button on it and collapses back to its miniature size when the user releases the mouse button. This way, the selection behavior is still available, but you also provide the slider—and in a more obvious way.

There's no built-in class in Cocoa for either one. You'll have to implement your own.

Peter Hosey
"prevent the user from dragging to select the text" They don't tend to, if you double-click, it usually disables the scrubbyness, so you can select text as usual
dbr
Well, *that's* not obvious.
Peter Hosey
Actually, it's usually activated by a single click (In shake/Photoshop). That said, I've only seen such controls in fairly "high-end" applications, where they are absurdly useful and nice to use. I agree they are a bit obscure and unobvious for a "normal" desktop application.
dbr
Not so useful if you want to select the text (and haven't found out that you can select if you double-click but not if you single-click). I stand by the alternative I suggested—it would work just as well and be obvious to the user.
Peter Hosey
+1  A: 

I doubt that this exists in Cocoa framework. As far as I remember it is not mentioned in the Apple Human Interface Guidelines.

You can develop one yourself by using a custom view and tracking mouse events (-mouseDown:, mouseUp:, -mouseDragged:).

mouviciel