• 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
How to get an image in an icon button?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to get an image in an icon button?


  • Subject: How to get an image in an icon button?
  • From: Leonardo Borsten <email@hidden>
  • Date: Sun, 20 Apr 2008 11:06:59 -0400

Hi all,

I have a problem creating an icon button with pull-down menu in Interface Builder (v. 3.0). The icon image that I prepared, png format, will not load into the button when I select it from the drop-down menu.
I carefully followed the simple steps outlined in the Apple HIG guide (selection controls) but they don't work for me. From the guide:

"An icon or bevel button with a pop-up menu is easy to create in Interface Builder. First, drag a pop-up button (an NSPopUpButton object) into your window. Select the button and in the Attributes pane of the inspector, change its type to Pull Down. Finally, for a Rounded or Square Bevel Button, change the style to Square or Shadowless Square, respectively. For an icon button, it doesn’t matter which style you choose, but you must deselect the Bordered checkbox. Resize the button as needed."

I also tried to do it in code in the awakeFromNib method:
[sansButton setImage:[NSImage imageNamed:@"sans.png"]];

Is there any other way to get an image in an icon button?

Thanks,

Leonardo Borsten
http://www.fontcatalog.com


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

This email sent to email@hidden

  • Prev by Date: Re: Ld -U (Undefined Symbols) argument is ignored?
  • Next by Date: Re: Ld -U (Undefined Symbols) argument is ignored?
  • Previous by thread: Re: Ld -U (Undefined Symbols) argument is ignored?
  • Next by thread: [Xcode-Users] Unit Testing and Debugging?
  • Index(es):
    • Date
    • Thread