On 05/01/2013, at 12:16 AM, koko <k...@highrolls.net> wrote:

> I am currently drawing a custom divider via -drawDividerInRect but want to 
> improve this and am not sure of the proper approach.
> 
> I would like to draw a divider similar to that in the Xcode Utilities view 
> which has the four buttons for Template, Code, Object and Media Libraries.
> 
> This divider is interesting in that with the cursor over the divider and not 
> a button it is the pane splitter and cursor and over a button it is the arrow.
> 
> How is this divider created and drawn … ?


I don't know how it's implemented, but my guess would be that it isn't a custom 
divider at all.

NSplitView allows you, via its delegate, to specify a region that *acts* like 
the divider, even if it isn't. The panel with the buttons is probably just 
another view within the split view content, but which is added to the split 
view's divider area using [NSSplitViewDelegate 
splitView:additionalEffectiveRectOfDividerAtIndex:]

--Graham



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to