NSSegmentedControl as toolbar item of a textured window
NSSegmentedControl as toolbar item of a textured window
- Subject: NSSegmentedControl as toolbar item of a textured window
- From: João Pavão <email@hidden>
- Date: Fri, 19 Nov 2004 23:19:35 +0000
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