Re: Views within NSTextView
Re: Views within NSTextView
- Subject: Re: Views within NSTextView
- From: Douglas Davidson <email@hidden>
- Date: Mon, 6 Feb 2006 15:37:10 -0800
On Jan 28, 2006, at 4:56 PM, Sean Willson wrote:
I've been digging through the archive and haven't found any
solution to this
problem nor have I found it elsewhere online. I am yet another person
attempting to create an AddressBook style editor or some semblance
of that
behavior of a smooth layout with autoresizing textfields. So here
is my
problem ... I have a custom NSTextAttachmentCell that I am using to
forward
on events to NSButtons, NSTextFields, etc. I can get the widgets to
display
in the NSTextView fine BUT I can't for the live of me get it to
make the
widgets usable. What I mean by this is that I can't click in the
TextField
and get focus and I can't click the button. Here is how I am
setting them
up:
Well, a text field cell isn't a text field. One option is to take
the mouse events and do what the text field would do with them if it
were there, i.e. get a field editor and install it--for a sample of
this sort of thing, see Sketch. If handling the mouse events from
the attachment cell isn't sufficient, then you can create an actual
text field and add it as a subclass to your text view at the
appropriate place.
Douglas Davidson
_______________________________________________
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