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 and setMenuFormRepresentation

toolbar and setMenuFormRepresentation
Thread Tools
Mac Enthusiast
Join Date: Oct 2001
Status: Offline
Reply With Quote
May 4, 2002, 05:20 PM
 
I've got an NSToolbar with a bunch of little views that act as my toolbar items. Im trying to get their text labels to become un-ghosted and accept clicks. I've read the documentation on this subject as well as checked out the simple toolbar app to no avail. Could someone hook a brother up with some help? Heres a snippet of my current code:

NSToolbarItem *item = [[NSToolbarItem alloc] initWithItemIdentifier:itemIdentifier];
if ( [itemIdentifier isEqualToString:@"SearchButton"] )
{
NSRect fRect = [searchButtonView frame];
[item setLabel:@"Find"];
[item setPaletteLabel:@"Find"];
[item setView:searchButtonView];
[item setMinSize:fRect.size];
[item setMaxSize:fRect.size];
[item setToolTip:@"Start search"];
}
3R1C
     
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
May 4, 2002, 11:00 PM
 
As far as I've been able to determine, you can't make a toolbar item with a custom view have a label-only-mode representation that acts as a one-click button (instead of like a popup menu). I've filed it as a bug with Apple.
Rick Roe
icons.cx | weblog
     
3R1C  (op)
Mac Enthusiast
Join Date: Oct 2001
Status: Offline
Reply With Quote
May 5, 2002, 01:17 AM
 
Thanks Rick, I'm too new to know when some code I've written is right or not. Now I can move on...
3R1C
     
   
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:53 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