• 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
Re: Help on NSToolbar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help on NSToolbar


  • Subject: Re: Help on NSToolbar
  • From: Mike Abdullah <email@hidden>
  • Date: Sun, 12 Mar 2006 18:37:49 +0000


On 12 Mar 2006, at 18:10, Karim Morsy wrote:

An alternative approach would be to use a tab view. That way, you can set up all your preferences in one NIB file. An NSTabView can be set up to have no tabs and no border, in which case it'll be invisible and you can use the toolbar to control it.

that sounds like a good approach.

The trouble with this is if you want your different preference views to have different sizes as in iTunes.



Look at selectedItemIdentifiers or whatever it was called.

this is only for setting or retrieving the selected item prgrammatically. what I want to do his highlight an item when it is selected (as done in itunes prefs).
does anyone how to do this ?

That's what setSelectedItemIdentifier is for ;)


thanks, Karim


On Mar 12, 2006, at 6:52 PM, Uli Kusterer wrote:

Am 12.03.2006 um 18:39 schrieb Karim Morsy:
I'd like to create a preference window for my application in the style of the regular mac os apps, such as itunes, i.e. a window with a toolbar that contains various items.
the items are highlighted in grey when selected.
I've created an nstoolbar an added six items along with their images.
I haven't found a method neither in NSToolbar nor in NSToolbarItem that does the grey highlighting when an item is selected. how can this be achieved ?

Look at selectedItemIdentifiers or whatever it was called.

+ for each toolbar item I'm displaying a different view. the best approach would probably be to have a seperate nibfile for the prefs window and for each displayed preference item. what would then be the best way to implement this ? I have an nswindowcontroller for the prefs window. how would I load the other windows then (depending on the item selection), such as the window that's dsiplayed for "Advanced" or "General".

Don't use separate windows. Just show/hide the views in one window.

 Look at NSNibLoading on how to actually load a NIB file.

An alternative approach would be to use a tab view. That way, you can set up all your preferences in one NIB file. An NSTabView can be set up to have no tabs and no border, in which case it'll be invisible and you can use the toolbar to control it.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


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
  • Follow-Ups:
    • Re: Help on NSToolbar
      • From: Karim Morsy <email@hidden>
References: 
 >Help on NSToolbar (From: Karim Morsy <email@hidden>)
 >Re: Help on NSToolbar (From: Uli Kusterer <email@hidden>)
 >Re: Help on NSToolbar (From: Karim Morsy <email@hidden>)

  • Prev by Date: Re: Sheet in a non-document-based Application
  • Next by Date: Core Data Metadata
  • Previous by thread: Re: Help on NSToolbar
  • Next by thread: Re: Help on NSToolbar
  • Index(es):
    • Date
    • Thread