Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Toolbar highlight?

Toolbar highlight?
Thread Tools
Grizzled Veteran
Join Date: Jun 2002
Status: Offline
Reply With Quote
Nov 28, 2003, 10:34 AM
 
How do I acheive a toolbar highlight, like in apps like Sherlock and Safari prefs? Does it require a lot of coding or is it a simple value?
     
Grizzled Veteran
Join Date: Jun 2002
Status: Offline
Reply With Quote
Nov 28, 2003, 12:21 PM
 
It seems it has something to do with:

setSelectedItemIdentifier:

But I don't know how to use it...anyone know?
     
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
Nov 28, 2003, 04:45 PM
 
If your set up is a simple toolbar-as-pane-switcher deal (a la Apple Mail's preferences window), all you need to do is implement -toolbarSelectableItemIdentifiers: to return the same as -toolbarDefaultItemIdentifiers: and -toolbarAllowedItemIdentifiers:. NSToolbar will then automatically highlight items when they're clicked.

If your setup is more sophisticated -- say, like System Preferences where you can select a pane without clicking it on the toolbar -- you'll still need to do the above, and then call -setSelectedItemIdentifier: whenever you want the selection highlight to change.
Rick Roe
icons.cx | weblog
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:28 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2