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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to