Re: NSRulerView
Re: NSRulerView
- Subject: Re: NSRulerView
- From: Graham Cox <email@hidden>
- Date: Wed, 29 Jul 2009 11:42:08 +1000
On 29/07/2009, at 7:58 AM, David Blanton wrote:
Any insight on why this does not change the ruler measurement units:
[[[NSRulerView alloc] initWithScrollView:_scrollView
orientation:NSHorizontalRuler] setMeasurementUnits:@"Centimeters"];
TIA!
Yes, because NSRulerView knows nothing of these "Centimeters" of which
you speak.
You have to register the units you want to use with NSRulerView prior
to use, using:
+ (void)registerUnitWithName:(NSString *)unitName abbreviation:
(NSString *)abbreviationunitToPointsConversionFactor:
(CGFloat)conversionFactor stepUpCycle:(NSArray *)stepUpCycle
stepDownCycle:(NSArray*)stepDownCycle
This sets up an internal table associated with the name "Centimeters"*
(or whatever) that tells the ruler how to lay out its marks.
You know, you could do worse than to spend a few hours actually
reading the documentation - most of the questions you are rapidly
firing at the list are answered therein.
--Graham
*P.S. it's "Centimetres"
_______________________________________________
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
References: | |
| >NSRulerView (From: David Blanton <email@hidden>) |