firstLineHeadIndent item in NSParagraphStyle dictionary
firstLineHeadIndent item in NSParagraphStyle dictionary
- Subject: firstLineHeadIndent item in NSParagraphStyle dictionary
- From: "Ewan Delanoy" <email@hidden>
- Date: Thu, 2 Aug 2007 12:35:27 +0200 (CEST)
- Importance: Normal
Hello all,
I have an NSTextView subclass that has an additional (float) ivar
"indentWidth" and overrides the
-defaultParagraphStyle method as follows :
-(NSParagraphStyle*)defaultParagraphStyle
{
NSParagraphStyle* oldStyle=[super defaultParagraphStyle];
NSMutableParagraphStyle* newStyle=[oldStyle mutableCopyWithZone:NULL];
[newStyle setParagraphStyle:oldStyle];
float newIndent=(float)indentWidth;
[newStyle setFirstLineHeadIndent:newIndent];
return newStyle;
}
The aim is thus to make the "firstLineHeadIndent" parameter customizable.
As far as I could check in the debugger, this works fine, at least
programatically. At runtime, however, when I write paragraphs in the text
view (using the "Tab" key to
indent the first line) it seems that paragraphs still have
the same indentation and that the change is not reflected in the UI ?
Ewan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden