• 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
Re: Outline view questions (hide items & multiple line text)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Outline view questions (hide items & multiple line text)


  • Subject: Re: Outline view questions (hide items & multiple line text)
  • From: Drew McCormack <email@hidden>
  • Date: Tue, 13 Nov 2001 19:20:27 -0800

(2) I have editable text items in my outline. Again, this was easy - for single line text items. I'd like some of my text items to be able to expand to multiple lines of text, rather than just be a single line.

Any tips on making this work easily?

I'm afraid you will have to join the queue, Michael. There have been several people trying to do this, and, to my knowledge, nobody has succeeded. That's not entirely true, because I have been in communication with Steve Nygard who worked on OmniOutliner, and he did it (see OmniOutliner), but only by writing a whole new Outline class (around 7000 lines).

I gave it a good shot, and I am convinced it could be done by subclassing NSOutlineView, but I couldn't figure out exactly how to do it, and nobody on this list was really able to help. I was actually subclassing NSTableView, but the principal should be the same. I was able to get rows to resize as text was entered by overriding the layout methods of NSTableView (eg rectOfRow, frameOfCell:withRow:column). This worked well, but the field editor, which is actually a shared instance of NSTextView, would not resize to fit the resized cell; instead, the text would just scroll. I tried setting all sorts of parameters for the field editor, and its NSTextContainer, but could not get it to resize. I'm sure it could be done, but I couldn't figure out how.

If you have any ideas about how I could do this, let me know. If you want the code from my attempt, just ask. It's not pretty, but it is a start.

Drew McCormack


References: 
 >Outline view questions (hide items & multiple line text) (From: Michael Peirce <email@hidden>)

  • Prev by Date: Re: NSMovieView bug ?
  • Next by Date: Re: Getting user idle time - screenSaver?
  • Previous by thread: Outline view questions (hide items & multiple line text)
  • Next by thread: Playing sounds without QT
  • Index(es):
    • Date
    • Thread