• 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
NSRect for intertion point in NSTokenField (or NSTextField)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSRect for intertion point in NSTokenField (or NSTextField)


  • Subject: NSRect for intertion point in NSTokenField (or NSTextField)
  • From: Justin Hawkwood <email@hidden>
  • Date: Fri, 4 Apr 2008 11:49:19 -0700

I'm working on making a NSTokenField inside of a NSScrollView work properly so that keying through the tokens adjusts the scroll view to keep the insertion point visible. I've subclassed NSTokenField and am catching the textViewDidChangeSelection: notification, but I don't know how to find the rect for the insertion point (or selectedRange). With that, I could then call

[self scrollRectToVisible:insertionRect];

and the scrollView would do the rest.

So, is there something obvious I'm missing that does this? If not, since the tokenfield wraps, is there a way to find out what line the insertion point is on so that I can calculate the rect?

Thanks.

~ Justin Hawkwood
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Need for a creator code?
  • Next by Date: Re: core data - beyond the simple example
  • Previous by thread: Re: How to create process independent of current process AND that takes command line arguments?
  • Next by thread: Apple support incidents
  • Index(es):
    • Date
    • Thread