Custom Column Header

  • I am looking to draw my own column header for an NSOutlineView.  I
    have looked at the classes NSTableHeaderCell and NSTableHeaderView and
    I am not quite sure which I need to implement to make this happen.  It
    would seem that you would need to create a custom NSTableHeaderCell
    that calls a custom NSTableHeaderView, but I am not sure what methods
    would need to be implemented.  I have looked at some of the user
    experience demos mainly the "Source View" demo and there is no mention
    of changing the header columns.

    Any advice on where to start would be very much appreciated.

    Thanks in advance.
  • On Jan 17, 2008, at 9:39 AM, Chris Schmitt wrote:

    > I am looking to draw my own column header for an NSOutlineView.  I
    > have looked at the classes NSTableHeaderCell and NSTableHeaderView
    > and I am not quite sure which I need to implement to make this
    > happen.  It would seem that you would need to create a custom
    > NSTableHeaderCell that calls a custom NSTableHeaderView, but I am
    > not sure what methods would need to be implemented.  I have looked
    > at some of the user experience demos mainly the "Source View" demo
    > and there is no mention of changing the header columns.
    >
    > Any advice on where to start would be very much appreciated.
    >

    Here's how:

    1. Create a custom subclass of NSTableHeaderCell.
    2. Call [tableColumn setHeaderCell:yourCell] -- this is the piece you
    are missing. It is easy to do..

    corbin
previous month january 2008 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today