editing in a custom NSView
editing in a custom NSView
- Subject: editing in a custom NSView
- From: Torsten Curdt <email@hidden>
- Date: Sat, 19 Apr 2008 01:32:07 +0200
Hey guys,
I need some pointers into the right direction.
I would like to create a view that display a list of objects with
their attributes. Of course NSTableView could do that. But I would
like the rows to expand vertically when I add more information to the
object ...and have the attributes not just layed out in column based
manner. The most simple example: a list of multi line edit fields.
Example: OmniOutliner - press alt-enter and the line height increases.
AFAIK you cannot do that with either NSTableView or NSCollectionView
as the row heights may be different per row.
So I already got a custom view that is manually bound to
NSArrayController and draws the objects. Now I need to make one of the
object's string attributes editable. How to do that best?
I assume I could catch the click on the item, then (somehow) show in
place a NSTextView and have the user do the changes to the text. On
every change I would check the height of the NSTextView and apply that
to the drawing of the item. Once done I'll hide the NSTextView again.
Does that sound like reasonable approach? Or how would you tackle this?
Any suggested example or open source project to look at?
cheers
--
Torsten
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden