NSRulerView custom labels
NSRulerView custom labels
- Subject: NSRulerView custom labels
- From: Richard Bannister <email@hidden>
- Date: Sat, 14 Feb 2009 22:00:07 +0000
Folks
I'm working on an app that will be using timestamps in a NSRulerView -
in the format 0:01, 0:02, et al.
As far as I can determine I can't do this directly by registering a
special unit as there does not appear to be any support for two part
units of this form.
The header file for NSRulerView says:
- (void)drawHashMarksAndLabelsInRect:(NSRect)rect; // You should never
need to call this, but you might want to override it. This method is
called by -drawRect: to draw the actual hash-marks and labels on the
ruler. If you want to do custom hash-marks and labels you should first
look at doing it with a delegate. You can do whatever kind of custom
hash-marks you want through delegation as long as the hash-marks and
labels are evenly spaced. But if you need to do hash-marks or labels
that are not evenly spaced you will need to override this.
However, the only references I can find to the appropriate delegation
on the Internet are four year old posts from someone else asking
exactly the same question.
What should I do in this situation? I've no need to adjust the
existing hash marks, just the displayed labels.
Thanks in advance
Richard
_______________________________________________
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