Icons in column-headers

  • Hi, Sorry if this is a really dumb/obvious question, but how can I
    put a little icon in a the column-headers of my NSTable? I've not
    found any information on this. For example, my app has a list of
    items that can be enabled/disable by check-boxes in the first column.
    The title of this column is currently 'Enabled' which is lame. I want
    to put a little icon in there.

    Thanks.


    ___________________________________________________________
    Now you can scan emails quickly with a reading pane. Get the new Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html
  • On 5 okt 2006, at 23.31, Ari Benzane wrote:

    > Hi, Sorry if this is a really dumb/obvious question, but how can I
    > put a little icon in a the column-headers of my NSTable? I've not
    > found any information on this. For example, my app has a list of
    > items that can be enabled/disable by check-boxes in the first
    > column. The title of this column is currently 'Enabled' which is
    > lame. I want to put a little icon in there.

    The table header is drawn by the NSTableHeaderCell of the
    NSTableColumn. You can use the NSCell method "-setImage:" to set an
    image - As described here:

    <http://developer.apple.com/documentation/Cocoa/Conceptual/TableView/
    Concepts/TableParts.html
    >

    j o a r
  • You need to subclass NSTableHeaderCell and then use the
    setHeaderCell: method of NSTableColumn.

    Mike.

    On 5 Oct 2006, at 22:31, Ari Benzane wrote:

    > Hi, Sorry if this is a really dumb/obvious question, but how can I
    > put a little icon in a the column-headers of my NSTable? I've not
    > found any information on this. For example, my app has a list of
    > items that can be enabled/disable by check-boxes in the first
    > column. The title of this column is currently 'Enabled' which is
    > lame. I want to put a little icon in there.
    >
    > Thanks.
    >
    >
    > ___________________________________________________________Now you
    > can scan emails quickly with a reading pane. Get the new Yahoo!
    > Mail. http://uk.docs.yahoo.com/nowyoucan.html
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/mike.abdullah%
    > 40gmail.com
    >
    > This email sent to <mike.abdullah...>
previous month october 2006 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