Re: advice for creating these controls
Re: advice for creating these controls
- Subject: Re: advice for creating these controls
- From: Seth Willits <email@hidden>
- Date: Thu, 22 Mar 2012 13:32:11 -0700
On Mar 22, 2012, at 7:14 AM, Rick C. wrote:
> Just looking for an opinion what's the best way to create controls like this:
>
> http://cl.ly/191V3Z1C0m2k2U0V443x
>
> I initially assumed subclassing NSSegmentedControl, but then I was thinking maybe I can just subclass NSButton and put them together. Or maybe even make this out of a custom view? Any help would be appreciated thanks,
Well it depends on what exactly you mean. Do you want the exact look, or just the functionality and behavior? The bottom two are just plain NSSegmentedControls with a custom appearance. If you want the same appearance, you'll have to subclass it and draw the segments yourself.
The button/popup combo is a custom control. You coooould make it out of two customized controls, a button and a popup and smoosh them together (the button would draw no right edge, and the popup would draw the vertical separator as its left edge), or you could make it a single custom control. Either approach would work, but I always do the latter.
--
Seth Willits
_______________________________________________
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