custom NSRulerView
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.