Re: Filling TableView with NSTableColumns
Re: Filling TableView with NSTableColumns
- Subject: Re: Filling TableView with NSTableColumns
- From: Jonathan Hendry <email@hidden>
- Date: Fri, 6 Jul 2001 22:36:16 -0500
On Friday, July 6, 2001, at 10:23 , Tom Waters wrote:
After you've added all the columns you want, do this:
NSTableColumn *col = [[[NSTableColumn alloc] initWithIdentifier:
@"extra"] autorelease];
[[col headerCell] setTitle: @""];
[col setMinWidth: 0];
[col setMaxWidth: 10000];
[tableView addTableColumn: col];
works for me... the only downside is if you are letting the
columns get reordered, this one can get dragged off the right...
i'm not sure if there's a way to make just one column immovable.
The table view's delegate could probably prevent any attempt to
select that column, and undo any attempt to drag another
column to its right.
- (BOOL)tableView:(NSTableView *)tableView
shouldSelectTableColumn:(NSTableColumn *)tableColumn;
- (void) tableView:(NSTableView*)tableView
didDragTableColumn:(NSTableColumn *)tableColumn;
or
- (void)tableViewColumnDidMove:(NSNotification *)aNotification
If a column has been moved to the right of the dummy column, pop
it over to the left of the dummy column.
--
Jonathan W. Hendry Looking for NeXTSTEP/OpenStep/
email@hidden WebObjects/J2EE work in Chicago