• 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
Re: NSRulerView cusom hashMarks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSRulerView cusom hashMarks


  • Subject: Re: NSRulerView cusom hashMarks
  • From: Graham Cox <email@hidden>
  • Date: Tue, 21 Oct 2008 13:03:24 +1100


On 21 Oct 2008, at 5:40 am, josh hughes wrote:

Hi,

I need to alter the hashMarks of an NSRulerView so that the labels increment from 1 rather than the default: 0. As I understand it, this should be done by either subclassing NSRulerView and overriding drawHashMarkAndLabelsInRect: or using a delegate.


Just call -setOriginOffset: with a suitable value to place the '1' mark where you want it. Of course you're really placing the '0' mark, but you can set it to some negative value as needed.

--Graham
_______________________________________________

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 cusom hashMarks (From: josh hughes <email@hidden>)

  • Prev by Date: Re: NSURL, NSURLRequest, and NSURLConnection
  • Next by Date: Re: Custom CALayer Action as animation key?
  • Previous by thread: NSRulerView cusom hashMarks
  • Next by thread: NSURL, NSURLRequest, and NSURLConnection
  • Index(es):
    • Date
    • Thread