Used Size of Text View
Used Size of Text View
- Subject: Used Size of Text View
- From: Francisco Tolmasky <email@hidden>
- Date: Tue, 17 Feb 2004 11:54:33 -0800
Is there any way to get the size of the used portion of a text view,
without using the nslayoutmanager to calculate it each time. I will
probably be querying it after text insertion so I would like it to be
fast. Basically I just want to know when a new line is needed (either
because of a text wrap or because of an actual newline insertion).
Unfortunately, [textView frame].size.height is the height of the view
even if the text takes up less space and [[textView textContainer]
containerSize].height always returns 1000000 or something like that
since it needs to be big enough to keep fitting text. So is there a
stored value somewhere, or will I have to calculate glyph sizes?
Thanks in advance,
Francisco Tolmasky
email@hidden
http://users.adelphia.net/~ftolmasky
_______________________________________________
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.