Re: Yosemite-like Toolbar: Segmented Controls, Buttons, Template Images?
Re: Yosemite-like Toolbar: Segmented Controls, Buttons, Template Images?
- Subject: Re: Yosemite-like Toolbar: Segmented Controls, Buttons, Template Images?
- From: Jerry Krinock <email@hidden>
- Date: Wed, 17 Dec 2014 22:24:45 -0800
> On 2014 Dec 17, at 22:02, Shane Stanley <email@hidden> wrote:
>
> You're not saying which version of Xcode
6.1
> FWIW, I went through a lot of similar trial and error, and found that setting a segmented style of Automatic gives me a similar result to, say, the View menu in a Finder window.
Ah, I see now, with Mode = “Select None”. I thought that would make it momentary or something, but I see now that “Select None” seems to mean “turn off the blue background”, which is part of what I want.
> I call setSegmentStyle:NSSegmentStyleSeparated when it loads under 10.10, which gives the separated appearance. But in terms of how template images work, it's the same.
I presume you mean that -setTemplate:YES does not give the desired result. At least that’s what I’m seeing. With “Select None”, the segment and its image look the same whether it is selected or not. It does not change the black lines in my image to blue, as desired.
Maybe I need to change the image in code when a segment is selected, redrawing with a blue stroke? That is disappointing. Maybe I could subclass NSSegmentedControl to get this behavior.
And, to make a button with the same style, use (eeek) a segmented control with one segment?
Jerry
_______________________________________________
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