• 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
Non clickable NSToolbarItem label
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Non clickable NSToolbarItem label


  • Subject: Non clickable NSToolbarItem label
  • From: Lorenzo <email@hidden>
  • Date: Sun, 28 Oct 2007 08:29:15 +0100

Hi,
I add a NSButton to the toolbar.
If the user clicks on the NSToolbarItem icon I get the proper action.
But I cannot get any action when the user clicks on the label of the
NSToolbarItem. Instead, if I set just the image with
[item setImage:anImage]], the label is properly clickable. But I get a
distorted and smaller button. What do I miss?

id item = [[[NSToolbarItem alloc] initWithItemIdentifier:name] autorelease];
    [item setPaletteLabel:name];
    [item setLabel:name];

    // if I use this, the label showing the name is clickable
    // but the icons are distorted, even setting min and max size
    [item setImage:[itemView image]];

    // instead if I use this, the label showing the name is not clickable
    // the icons are shown with the right size.
    [item setView:itemView];

    // no matter if I add this
    SEL   act = [itemView action];
    id    tar = [itemView target];
    if(act && tar){
         [item setAction:act];
         [item setTarget:tar];
    }



Best Regards
--
Lorenzo
email: email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Non clickable NSToolbarItem label
      • From: Benjamin Stiglitz <email@hidden>
  • Prev by Date: NSManagedObjectContext - Key Value compliant
  • Next by Date: Remove dependencies from a nib (IB 3.0)
  • Previous by thread: re: NSManagedObjectContext - Key Value compliant
  • Next by thread: Re: Non clickable NSToolbarItem label
  • Index(es):
    • Date
    • Thread