• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSSegmentedControl as toolbar item of a textured window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSSegmentedControl as toolbar item of a textured window
      • From: The Karl Adam <email@hidden>
  • Prev by Date: Re: My bug or Apple's?
  • Next by Date: Re: Sending Hyperlink IM through Applescript
  • Previous by thread: Re: NSTask Permission denied
  • Next by thread: Re: NSSegmentedControl as toolbar item of a textured window
  • Index(es):
    • Date
    • Thread