Re: cocoa-dev digest, Vol 2 #4352 - 16 msgs
Re: cocoa-dev digest, Vol 2 #4352 - 16 msgs
- Subject: Re: cocoa-dev digest, Vol 2 #4352 - 16 msgs
- From: Glen Low <email@hidden>
- Date: Sun, 13 Jun 2004 19:57:26 +0800
On 13/06/2004, at 12:40 PM, email@hidden wrote:
The main functions I had to
override were -drawWithFrame:inView:,
-editWithFrame:inView:editor:delegate:event:, and the tracking
methods. You might not need the tracking methods, I'm not sure. In
-editWithFrame:..., I always have it call the text field's
-editWithFrame:... method, though you'll probably need to check the
mouse coords in the event to see which one it should call. I also had
to modify the rectangle I sent to the text field's edit method and
draw methods to only draw (or edit) in half the cell.
I also had to override -setObjectValue: and -objectValue, of course,
and don't forget to implement -copyWithZone:. That one bit me hard,
because NSOutlineView likes to make lots of copies of the cell. If
you need more details, let me know.
Thanks for the tips. You've just saved me lots of digging time.
You can also take a look at my PGFontTextFieldCell,
PGColorTextFieldCell, and PGPopUpTextFieldCell from Graphviz in the
bowels of
http://www.graphviz.org.
This seems to be a direct mirror of the sources:
http://custom.lab.unb.br/pub/graph/graphviz/mac/
Cheers, Glen Low
---
pixelglow software | simply brilliant stuff
www.pixelglow.com
_______________________________________________
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.