• 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: Bounding rect for String when wrapped
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Bounding rect for String when wrapped


  • Subject: RE: Bounding rect for String when wrapped
  • From: "Jonathan E. Jackel" <email@hidden>
  • Date: Wed, 11 Sep 2002 13:20:38 -0400

> On Wed, 11 Sep 2002 01:36:53 EDT, email@hidden said:
>
> >I can use drawInRect:withAtrributes: to draw the String in a
> given rectangle
> >with word wrapping, but first I need to calculate the rectangle.
> I know the
> >width, but am having problems calculating the height.
>
> What I do is call -sizeToFit and then look to see what the height is.
> Perhaps this is somewhat crude and not the right way, but it
> works great. m.


What about -(NSSize)sizeWithAttributes: in NSString Additions,
or -(NSSize)size in NSAttributedString Additions?

Jonathan
_______________________________________________
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.

  • Follow-Ups:
    • Re: Bounding rect for String when wrapped
      • From: Jonathan Jackel <email@hidden>
References: 
 >Re: Bounding rect for String when wrapped (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: real authority on what needs to be released
  • Next by Date: Re: contextual menu with unicode characters
  • Previous by thread: Re: Bounding rect for String when wrapped
  • Next by thread: Re: Bounding rect for String when wrapped
  • Index(es):
    • Date
    • Thread