Re: Rounding the output value while the slider is being moved
Re: Rounding the output value while the slider is being moved
- Subject: Re: Rounding the output value while the slider is being moved
- From: Hank Heijink <email@hidden>
- Date: Fri, 29 Sep 2006 10:19:47 -0400
Whoops, forgot to include the list in the previous reply. Sorry about
that.
On Sep 29, 2006, at 10:08 AM, Artemiy Pavlov wrote:
I would just put a number formatter on your textfield.
Uhm, I am not sure how I'd do that - is it in the docs for
NSTextField?
It's in interface builder, text palette, lower left corner. The one
with the dollar sign. Just drop it on the text field and check out
the properties in the inspector.
Personally I would use bindings for a case like this -- it saves
you from having to manually update the textfield when the slider
is moved and vice versa.
Yes I know, but how would I go about to round the value then?
I thought the rounding was just for visual presentation -- the
formatter takes care of that. If you need to round the value anyway,
round the value in your setter method or when you actually use the
value.
Hank Heijink
www.hankheijink.com
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden