NSTextFieldCell & editWithFrame
NSTextFieldCell & editWithFrame
- Subject: NSTextFieldCell & editWithFrame
- From: David Haas <email@hidden>
- Date: Fri, 16 Aug 2002 23:04:02 -0500
Hi. I've seen problems like this come up in the archives, but none that
exactly match my situation, so I'll toss this out & hope someone can give
me a hand.
I've got a text field in which I'd like to draw an image as well as text.
I made a custom class of NSTextField (which uses a custom NSTextFieldCell
as its cell), and it's drawing the image & text correctly positioned.
Unfortunately, when I edit the text field, the field editor is filling
the
entire cell, thereby covering up the entire image. Peeking
through the documentation & the list archives, I figured I had to
implement
editWithFrame: in the cell to fix this. I did, but it's never getting
called.
If I implement selectWithFrame, it does get called, and I can change the
selection field (& thereby position of the field editor so it doesn't
cover the
image) but . . . then the highlight doesn't include the image, and it
looks goofy.
In both cases, I copied & pasted the methods directly from Apple's
DragNDropOutlineView example code, so I'm reasonably sure there's no
typos.
What do I have to do to get editWithFrame called? What should be calling
it?
Any suggestions appreciated.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.