• 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
Mixing controls in NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mixing controls in NSTableView


  • Subject: Mixing controls in NSTableView
  • From: Luke Burton <email@hidden>
  • Date: Wed, 28 Dec 2005 10:17:07 +1100

Hi all,

I have something I would like to do with an NSTableView. I have explored
several options, including some tutorials on stepwise.com, but haven't found
an elegant solution.

I have a simple two column NSTableView that is entirely text, which I use
for preferences. The right column can be edited and free text entered.

For some cells, however, I would like to use another control. For instance,
when editing a colour value, I would prefer to have a NSColorWell so the
user can pick what they want graphically. Note I only want it for some: I
don't want the whole column to only have NSColorWells.

My investigations have led me to believe that the NSTableVIew delegate with
willDisplayCell:(id)aCell would be one of the best candidates to override
what will be displayed in the cell. The stepwise tutorial (
http://www.stepwise.com/Articles/Technical/2003-12-20.01.html) focused on
enabling one to display a custom NSView inside a cell. While I'm new to
cocoa, this still seemed like overkill for what I want.

It seems I should just be able to say "instead of NSTextFieldCell, for this
cell use something else". Even if I have to make a simple subclass of NSCell
that wraps an NSColorWell, that would be fine.

Any recommendations?

Regards,

Luke.

--
Luke Burton.

Yes, questions. Morphology, longevity, incept dates.
_______________________________________________
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

  • Prev by Date: Re: Core Data & Custom Class
  • Next by Date: Re: Core Data & Custom Class
  • Previous by thread: Re: Core Data & Custom Class
  • Next by thread: Re: Mixing controls in NSTableView
  • Index(es):
    • Date
    • Thread