Using an NSTextList
Using an NSTextList
- Subject: Using an NSTextList
- From: Ian was here <email@hidden>
- Date: Thu, 8 Dec 2005 15:02:30 -0800 (PST)
NSTextList *textList = [[NSTextList alloc]
initWithMarkerFormat:@"({decimal})"
options:NSTextListPrependEnclosingMarker];
NSMutableParagraphStyle *paragraphStyle =
[[NSMutableParagraphStyle alloc] init];
NSRange textRange =
NSMakeRange( 0, [[textStorage string] length]);
[paragraphStyle setTextLists:[NSArray
arrayWithObject:textList]];
[myTextStorage
addAttribute:NSParagraphStyleAttributeName
value:paragraphStyle range:textRange];
[paragraphStyle release];
[textList release];
I'm trying to create a bulleted list in my text view
using NSTextList. In theory, this code should do the
trick. Does anyone see any reason why this wouldn't
work?
Thanks
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden