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:54:34 -0500
On Sep 14, 2006, at 3:15 PM, I. Savant wrote:
First, I'm sorry I totally didn't get what you were looking for. :-}
No problem. There's not really any standard terminology that I can
find about this kind of behavior.
About your drawing error with this approach ... is it wise to
return NSZeroRect if it's not the cell you want to draw? I'm
thinking that might leave the affected column's cell rect dirty,
which might cause drawing errors like this.
Wise? Probably not, but the behavior is closer when I do than when I
don't. If I don't interfere with the returned frame then selecting the
row draws empty cells over my extended data.
It's as if during column resize, the view is only drawing the column
that's resizing. What I'd like to do is mark the whole row dirty
during resize but I'm not seeing where I could make that change.
Maybe Corbin Dunn (who seems to be an NSTableView / NSOutlineView
guru at Apple) can answer that solidly, but that was the first
question that popped into my head when I looked at that line.
--
I.S.
On Sep 14, 2006, at 4:05 PM, Ashley Clark wrote:
- (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;
}
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