Modifying row rect indent in NSOutlineView
Modifying row rect indent in NSOutlineView
- Subject: Modifying row rect indent in NSOutlineView
- From: Andrew White <email@hidden>
- Date: Fri, 30 Jan 2015 15:45:42 +1100
I have an NSOutlineView on OS X 10.10. For non-group row, the indent
appears to change where each row starts but the rounded rect surrounding
each row always starts on the left margin. I want to modify it so that the
left edge of the rectangle is indented (at least for certain children).
Existing: (pardon the ASCII-art)
( Text )
( Text )
( Text )
Desired:
( Text )
( Text )
( Text )
I tried subclassing NSOutlineView and catching frameOutlineOfCellAtRow,
adding to theRect.origin.x and subtracting from theRect.size.width. This
didn't seem to make a difference. I have verified that the overridden
function is being called and theRect modified, but the rendered output
doesn't vary.
Is there another way to do this?
(Also, is there a way to customise the rendered indent level on a per-row
basis, rather than always indentationPerLevel ? )
Thanks
--
Andrew
_______________________________________________
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