Determining width of a cell in an NSOutlineView
Determining width of a cell in an NSOutlineView
- Subject: Determining width of a cell in an NSOutlineView
- From: Eric Gorr <email@hidden>
- Date: Fri, 19 Dec 2008 16:35:51 -0500
I only have a single column in my NSOutlineView.
The outline view looks like:
> Collapsible Row 1
Item 1
> Collapsible Row 2
Item 2
I need the height of a row an of an item displayed when the disclosure
triangle is clicked to be based on the width of the cell.
I can get the indentation level by doing:
NSInteger level = [outlineView levelForItem:item];
and the amount that is indented per level by doing:
CGFloat indentation = [outlineView indentationPerLevel];
Asking for the width of the column does not return the same width of
the bounds parameter when drawInteriorWithFrame is called for my cell.
What looks like could work is to get the frame of the NSOutlineView
and then subtract the width of the frame by:
indentation * (level + 1)
but this doesn't seem like it should be the right answer.
There doesn't seem to be a method I can call to obtain the bounds that
will be passed into drawInteriorWithFrame for my cell. Have I missed
something?
Any other ideas?
thank you.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden