Problem with NSOutlineView resizing
Problem with NSOutlineView resizing
- Subject: Problem with NSOutlineView resizing
- From: Gideon King <email@hidden>
- Date: Thu, 2 May 2002 21:36:55 +0800
I have an outline view which has two columns in it. As the items are
loaded, I want to set the width to be wide enough to display the widest
item.
What happens is that the cell draws just first part of the string (up to
the previous width), even though the title bar for the row is resized
successfully. If I select the cell or resize the window etc, it draws
the full cell title. I have tried various setNeedsDisplay calls to no
avail.
Has anyone else worked out how to resize the width of the columns
properly?
NSSize size;
NSRect rect;
[cell setStringValue:[item value]];
size = [cell cellSize];
if (size.width > columnWidth)
{
columnWidth = size.width;
}
[tableColumn setWidth:columnWidth];
TIA
Gideon
_______________________________________________
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.