• 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: NSOutlineView variable width cell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOutlineView variable width cell


  • Subject: Re: NSOutlineView variable width cell
  • From: "I. Savant" <email@hidden>
  • Date: Thu, 14 Sep 2006 14:35:32 -0400

On Sep 14, 2006, at 2:12 PM, Ashley Clark wrote:

Well, the gradients are nice but that's not really what I'm interested in.

  Oh. :-)

Essentially, I want some rows to have one full-width column while other rows will have three columns. Or at least that's the appearance I want.

Ah hah! Now I understand what you meant about ignoring the layout ...

The Spotlight results window still uses a fixed number of columns. The difference is that the cells in the "header" rows are "blank" and uneditable for the date and "info button" columns.

You can accomplish this by using custom NSCells and NSOutlineView's delegate methods (such as - outlineView:willDisplayCell:forTableColumn:item: and - outlineView:willDisplayOutlineCell:forTableColumn:item:) to swap the data cells with 'blank' cells for each row/column as they're displayed. OR you can use a custom cell that has an "isHeader" value, which draws the gradient and no value, and is uneditable if true.

There's a couple of approaches and I have no idea which is 'better', but the first one I mentioned is how I did this. :-)

--
I.S.




_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >NSOutlineView variable width cell (From: Ashley Clark <email@hidden>)
 >Re: NSOutlineView variable width cell (From: "I. Savant" <email@hidden>)
 >Re: NSOutlineView variable width cell (From: Ashley Clark <email@hidden>)

  • Prev by Date: Re: Re: Hide a window on close?
  • Next by Date: Re: NSOutlineView variable width cell
  • Previous by thread: Re: NSOutlineView variable width cell
  • Next by thread: Re: NSOutlineView variable width cell
  • Index(es):
    • Date
    • Thread