Re: Filling TableView with NSTableColumns
Re: Filling TableView with NSTableColumns
- Subject: Re: Filling TableView with NSTableColumns
- From: Tom Waters <email@hidden>
- Date: Fri, 6 Jul 2001 20:23:06 -0700
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.
On Friday, July 6, 2001, at 07:35 PM, Will Price wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
All over the place, I see people having problems getting their
NSTableColumns to fill the width of their NSTableViews. Let's say
your TableView is 200 pixels wide and your column is 100 pixels wide.
Well, the TableView draws a big ol' white space between the last
column and the edge of the TableView. The Finder is one of the few
apps that seems to have a solution for this. It correctly draws an
empty table column area between the last table column and the table
view edge.
I have tried creating a bogus column of massive width, but that
screws up the resizing of the table columns when windows are resized.
Surely there is a "correct" solution to this problem? I have at
least 10 tables in our app with this issue. I would really like a
method like [tableView alwaysFillEmptyColumnSpaceWithBogusColumn].
Any tips?