• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
firstLineHeadIndent item in NSParagraphStyle dictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: firstLineHeadIndent item in NSParagraphStyle dictionary
      • From: Martin Wierschin <email@hidden>
  • Prev by Date: Re: Thread Communication Conceptual Question
  • Next by Date: Re: Mixing Static and Dynamic Librararies, Multiple Definitions of Symbol, Two-Level Namespace
  • Previous by thread: Re: Using -interpretKeyEvents in NSTextView to interpret key events
  • Next by thread: Re: firstLineHeadIndent item in NSParagraphStyle dictionary
  • Index(es):
    • Date
    • Thread