RE: Bounding rect for String when wrapped
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.