Skip navigation.
 
mlcustom NSRulerView
FROM : Koen van der Drift
DATE : Thu Jan 30 16:36:57 2003

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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlcustom NSRulerView Koen van der Drift Jan 30, 16:36
mlRe: custom NSRulerView Marco Binder Jan 30, 17:43
mlRe: custom NSRulerView Koen van der Drift Jan 30, 19:04
mlRe: custom NSRulerView Koen van der Drift Jan 30, 19:33
mlRe: custom NSRulerView and other related issues Michael Latta Apr 6, 23:18
mlRe: custom NSRulerView and other related issues Koen van der Drift Apr 7, 15:46