• 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
Used Size of Text View
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Used Size of Text View
      • From: Jeremy Dronfield <email@hidden>
  • Prev by Date: Re: Insert two objects under the same column
  • Next by Date: How to make borderless window resizable
  • Previous by thread: Re: Using Java and Objective-C from same app
  • Next by thread: Re: Used Size of Text View
  • Index(es):
    • Date
    • Thread