Re: NSSegmentedControl as toolbar item of a textured window
Re: NSSegmentedControl as toolbar item of a textured window
- Subject: Re: NSSegmentedControl as toolbar item of a textured window
- From: The Karl Adam <email@hidden>
- Date: Sat, 20 Nov 2004 01:12:33 -0500
I was wondering why I was getting the ugly version of the control,
thanks for the heads up. Anyone got any ideas on how it's sensing the
type of it's window so I can subclass it and tell it to give me the
good appearance?
-Karl
On Fri, 19 Nov 2004 23:19:35 +0000, João Pavão <email@hidden> wrote:
> Hi,
>
> I'm using a segmented control in a toolbar to achieve something similar
> to the View item in the Finder's toolbars (Icon view, List view, Column
> view). I use NSToolbarItem's -setView: method, passing the segmented
> control as argument, to insert it in the toolbar of a textured window.
> Everything is working as expected, except for some inconsistencies in
> the control's appearance. I guess that the NSSegmentedControl checks
> whether the window that contains it is textured or not in order to
> decide the "theme" to use. You know, it draws with a flat look in
> textured windows and with a rounder look in traditional aqua windows.
> What happens is that when the control is inserted and first drawn in
> the toolbar, the look is fine - it draws using the "flat" glossy look.
> However, if the toolbar customization panel is run (a traditional aqua
> panel, may I remind you), or if the toolbar is hidden and then shown
> once again, the control gains its "rounder" look until I click in it.
>
> The fact that the control acts on its own to decide its look is a bit
> disappointing, as other controls (NSButton) usually let us tell them
> what "look" to use (textured or plain aqua) instead of investigating
> their window on their own.
>
> Does anyone know of an easy way to make the look of the segmented
> control more consistent across the toolbar, the customization panel,
> and showing/hiding the toolbar? Or is the only viable solution to code
> a custom control/button?
>
> Thanks,
> --
> João Pavão
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden