Re: NSOutlineView variable width cell
Re: NSOutlineView variable width cell
- Subject: Re: NSOutlineView variable width cell
- From: Ashley Clark <email@hidden>
- Date: Thu, 14 Sep 2006 15:05:13 -0500
On Sep 14, 2006, at 1:36 PM, John Terranova wrote:
I do some kind of funky stuff with my table. I subclass NSTableView
and override frameOfCellAtColumn:row:. This might give you some
ideas of where to look in documentation as you figure out how and
why this code works. In particular, look at the first case (colID
== 0): this allows the text in that cell to spill past the column
boundary, all the way to the right edge of the table.
That's what I'm looking for. I made a subclass of NSOutlineView and
overrode frameOfCellAtColumn:row: in a similar manner to yours
- (NSRect)frameOfCellAtColumn:(NSInteger)columnIndex row:(NSInteger)
rowIndex
{
NSRect cellFrame = [super frameOfCellAtColumn:columnIndex
row:rowIndex];
if ([self isGroupRow:rowIndex]) {
if ([[self tableColumns] objectAtIndex:columnIndex] != [self
outlineTableColumn])
return NSZeroRect;
cellFrame.size.width = [self bounds].size.width -
cellFrame.origin.x;
}
return cellFrame;
}
And it mostly works. Except when I resize a column such that the
bounds overflow their normal area. In that case the cells for the row
don't get redrawn correctly until I reselect the row.
This image shows what's happening after resizing the column but before
reselecting the row.
http://homepage.mac.com/aclark78/Picture 1.png
Ashley Clark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden