Re: AddressBook-like TextFields?
Re: AddressBook-like TextFields?
- Subject: Re: AddressBook-like TextFields?
- From: Ryan Stevens <email@hidden>
- Date: Sun, 22 May 2005 08:27:29 -0700
On May 21, 2005, at 12:56 PM, Justin Fagnani wrote:
So I've investigated and played around some more and determined that
as cool as the Address Book trick of subclassing NSTextView and
grabbing the selected range is, it won't work for me. The reason is
that I'm using CoreData and bindings and I want to set everything up
in IB.
So what I'm trying to do now is have a view that basically draws
custom focus rings along with TextField subclasses that display their
name in grey when there's no data.
I'm having a hell of a time getting anywhere though. I can iterate
through the subviews in drawRect and draw a rectangle around them, but
I can't figure out which one has the focus. I know the proper
terminology is firstResponder, but that's not really true either,
because as the knowledgeable folk here know, the firstResponder when a
TextField is selected is the windows FieldEditor. I can't seem to find
out which cell (it is individual NSTextCells that the FieldEditor
works for, right?) the FieldEditor is attached to. The frame of the
field editor is in the coordinate system of that view, so that does me
no good.
I've seen a few threads in the archives about this, but couldn't come
up with a clear answer.
Also, please correct me if I'm wrong about thinking about this as if I
want to draw a custom focusRing. I say it that way because it seems
like the focusRing is drawn by the parent view since it's actually
outside the edge of the view.
thanks,
-Justin
I'd start here; http://www.cocoadev.com/index.pl?CCDGrowingTextField
_______________________________________________
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