• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSRulerView custom labels
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSRulerView custom labels
      • From: Joel Reymont <email@hidden>
  • Prev by Date: NSTextField's subclass...
  • Next by Date: Re: NSTextField's subclass...
  • Previous by thread: Re: NSTextField's subclass...
  • Next by thread: Re: NSRulerView custom labels
  • Index(es):
    • Date
    • Thread