Re: Setting a TableView column title via code?
Re: Setting a TableView column title via code?
- Subject: Re: Setting a TableView column title via code?
- From: Joseph Heck <email@hidden>
- Date: Sun, 26 Oct 2003 15:48:00 -0800
On Oct 26, 2003, at 2:00 PM, Chewtoy wrote:
>
I'm new to cocoa so bear with me i haven't found a way to set the
>
title of a specific column via code?
Basically, you'll want to get the NSTableColumn and then you can use
the instance method headerCell to get the Cell and then setStringValue
on that to set the text. The note on doing this buried in the
documentation is at
http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/ObjC_classic/Classes/NSTableColumn.html#//apple_ref/doc/
uid/20000119/headerCell
Code snippet that probably doesn't work because I'm writing it in Mail
NSTableColumn * tc = [myTableView
tableColumnWithIdentifier:@"myColumnName"];
[[tc headerCell] setStringValue:@"some obnoxiously long title for the
column"];
There's some really nice notes on learning how to mess with TableView
at
http://www.cocoadev.com/index.pl?NSTableView and
http://www.cocoadev.com/index.pl?NSTableViewTutorial
-joe
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.