Re: Setting NSTextView's Font
Re: Setting NSTextView's Font
- Subject: Re: Setting NSTextView's Font
- From: Satoshi Matsumoto <email@hidden>
- Date: Wed, 31 Mar 2004 16:20:15 +0900
Hi Seth,
on 04.3.31 4:04 PM, Seth Willits at email@hidden wrote:
>
[[self textStorage] addAttribute:NSFontAttributeName value:[NSFont
>
fontWithName:@"Monaco" size:10.0] range:NSMakeRange(0, [[[self
>
textStorage] mutableString] length])];
>
>
>
But this does not work. My first thought was simply to set the font in
>
the nib itself, but it only works if the field also has text in it,
>
otherwise it defaults to Helvetica 12.
>
>
Is there something I'm missing?
Use the NSTextView method:
- (void)setTypingAttributes:(NSDictionary *)attrs;
For the initial typing attribute.
Satoshi
-----------------------------------------------------
Satoshi Matsumoto <email@hidden>
816-5 Odake, Odawara, Kanagawa, Japan 256-0802
_______________________________________________
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.