• 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
custom NSRulerView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

custom NSRulerView


  • Subject: custom NSRulerView
  • From: Koen van der Drift <email@hidden>
  • Date: Thu, 30 Jan 2003 10:36:57 -0500

Hi,

I want to customize an NSRuler of a NSScrollView, and from the documentation I found the method setRulerViewClass. So In MyDocument I call:

- (void)windowControllerDidLoadNib:(NSWindowController *) aController
{
[super windowControllerDidLoadNib:aController];

NSScrollView *scroller = [myTextView enclosingScrollView];
MyRulerView *ruler;

ruler = [[MyRulerView alloc] init];
[scroller setRulerViewClass: ruler];

[scroller setHasVerticalRuler:YES];
[scroller setRulersVisible:YES];

[ruler release];
}


However, I get an error that scroller doesn't respond to setRulerViewClass. This is from the docs:

+ (void)setRulerViewClass:(Class)aClass

Sets the default class to be used for ruler objects in NSScrollViews to aClass. This class is normally NSRulerView, but you can use this method to set it to a custom subclass of NSRulerView.


how do I solve this?

thanks,

- Koen.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: custom NSRulerView
      • From: Marco Binder <email@hidden>
  • Prev by Date: Re: Action based undo or snapshot based undo?
  • Next by Date: Re: copyWithZone and NSImageView subclass
  • Previous by thread: Re: copyWithZone and NSImageView subclass
  • Next by thread: Re: custom NSRulerView
  • Index(es):
    • Date
    • Thread