• 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
Re: Centering an NSAttributedString in a line in a view [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Centering an NSAttributedString in a line in a view [SOLVED]


  • Subject: Re: Centering an NSAttributedString in a line in a view [SOLVED]
  • From: email@hidden
  • Date: Thu, 20 Jul 2006 09:17:11 +0200 (CEST)
  • Importance: Normal

>I think the alignment of the page number is handled by the right-
>aligned tab stop, so changing the alignment of the paragraph won't
>make a difference. You would need to change the 576R tab stop or
>remove the tabs from the string so that it follows the paragraph
>alignment.
>--Michael

>- (NSAttributedString*) pageFooter {
> NSAttributedString* s = [super pageFooter];
> return [s attributedSubstringFromRange:NSMakeRange(1,[s length]-1)];
>}
>   m.

                Thanks to you both Michael and Matt. Matt's solution is
not clean (it makes unwarranted assumptions about the attributed string
returned by the superclass' pageFooter method) and besides it does not
work
on my test example. Michael's solution is simple and covers all cases : I
just
had to add the line

  [parsty setTabStops: [NSArray array]];

 at the appropriate place in my code.


                                                        Ewan


 _______________________________________________
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

References: 
 >Re: Centering an NSAttributedString in a line in a view (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Binding filterPredicate -- not working yet
  • Next by Date: Re: Capturing windows in an NSImage
  • Previous by thread: Re: Centering an NSAttributedString in a line in a view
  • Next by thread: OpenGL with Cocoa?
  • Index(es):
    • Date
    • Thread