• 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
NSStatusBar and image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSStatusBar and image


  • Subject: NSStatusBar and image
  • From: David Dauer <email@hidden>
  • Date: Thu, 30 Oct 2003 23:26:23 +0100

Hello,

I have a NSStatusBar and sets an Image. But the image i have is an icon only
with the 128x128px size. When i load it

path = [[NSBundle mainBundle] pathForResource:@"myIcon" ofType:@"icns"];
ofType:@"tiff"];
image = [[NSImage alloc] initWithContentsOfFile: path ];


statusItem = [[[NSStatusBar systemStatusBar]
statusItemWithLength:NSVariableStatusItemLength] retain];//
statusItemWithLength:24] retain];

[statusItem setImage: image];
[statusItem setHighlightMode:YES];
[statusItem setMenu:menu];
[statusItem setEnabled:YES];

Then i get a very big status menu. How to display the icon in 16x16 format?
Finder does it, the standart about box does it. How can i do this in code?
Thanks for any help
David
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSStatusBar and image
      • From: Andreas Mayer <email@hidden>
  • Prev by Date: Re: drawAtPoint rendering thin, light text?
  • Next by Date: Re: 10.3 problem...or me
  • Previous by thread: NSButtonCell subclass not tracking mouse
  • Next by thread: Re: NSStatusBar and image
  • Index(es):
    • Date
    • Thread