Field editor scrolling of control view?
Field editor scrolling of control view?
- Subject: Field editor scrolling of control view?
- From: Keith Blount <email@hidden>
- Date: Wed, 13 Apr 2005 07:07:52 -0700 (PDT)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
Hello,
I have a custom NSTableView subclass that allows for
variable row heights. The row heights alter to fit the
text as the user edits. However, I am stumped as to
how to get it so that if, for instance, the bottom of
a row containing multiple lines of text is clipped by
the scroll view and the user moves the insertion point
down to the non-visible text, the table view will
scroll to show the text.
I have tried listening for
NSTextViewSelectionDidChangeNotification so that I can
tell when the field editor changes selection with
limited success. I have found that
scrollRangeToVisible: doesn't work with the field
editor, but I can use layout manager methods to get
the rect of selected text, convert the rect to table
view co-ordinates and use scrollRectToVisible:.
However, the trouble with this is that it is difficult
to tell whether the user is selecting backwards and
forwards, and even worse, this notification is only
sent after the text selection is complete - it is not
sent during a drag-selection, for instance.
I have also tried returning a custom field editor from
my window delegate and trying to scroll to visible
from there, but with no luck.
Does anybody have any ideas about how I might achieve
this?
Many thanks in advance for any suggestions,
Keith
__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden