• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
editing in a custom NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: editing in a custom NSView
      • From: Jens Alfke <email@hidden>
    • Re: editing in a custom NSView
      • From: Mike Manzano <email@hidden>
  • Prev by Date: Re: Subclassing
  • Next by Date: Re: editing in a custom NSView
  • Previous by thread: Re: Subclassing
  • Next by thread: Re: editing in a custom NSView
  • Index(es):
    • Date
    • Thread