• 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: Custom Drawing Arbitrarily Long Lists (using NSTableView?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Drawing Arbitrarily Long Lists (using NSTableView?)


  • Subject: Re: Custom Drawing Arbitrarily Long Lists (using NSTableView?)
  • From: douglas welton <email@hidden>
  • Date: Wed, 12 Nov 2008 05:44:35 -0500

Check out NSCollectionView and NSCollectionViewItem.

On Nov 11, 2008, at 2:20 PM, James Williams wrote:

I'm working on a fairly simple application which will display a list of n
items. Right now, I'm displaying the items in an NSTableView, but I would
like to do something with a bit more pizazz.


Instead of a multi-column table, I want to make a single column list where
each entry in the list custom draws the information and controls it needs
(say a couple of labels, a checkbox, a small image, and a text field for
each item). Twitteriffic's interface is a pretty good example of the sort of
thing I'm going for.


In a different world, I would create a custom NSView subclass and add
NSTextField and NSButton views as subviews to my subclass; and then ask the
table view to use my NSView subclass to draw each row. Unfortunately,
NSTableView doesn't display NSView objects: it displays NSCell objects.


I've never worked with NSCell before so I'm sort of shooting in the dark.
NSCell doesn't seem to support subcells like NSView supports subviews. Would
I have to custom draw all of the UI elements I need and hand-code the click
responses and editing and such?


(My other idea would be to write a subclass of NSView which basically does
what NSTableView does; but using NSView objects instead of NSCell objects).


Both of my ideas seem like far too much work; which makes me think I'm
almost certainly doing it wrong. So what are my bad assumptions and how
would you do this?


Thanks

--James
_______________________________________________

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


References: 
 >Custom Drawing Arbitrarily Long Lists (using NSTableView?) (From: "James Williams" <email@hidden>)

  • Prev by Date: Re: How can I use NSTextField like a button?
  • Next by Date: Mysterious warning
  • Previous by thread: Custom Drawing Arbitrarily Long Lists (using NSTableView?)
  • Next by thread: tableView:objectValueForTableColumn:row not being called
  • Index(es):
    • Date
    • Thread