• 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
Re: [Q] Status Bar icon and Tiger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] Status Bar icon and Tiger


  • Subject: Re: [Q] Status Bar icon and Tiger
  • From: Nathan Kinsinger <email@hidden>
  • Date: Tue, 1 Jul 2008 13:34:03 -0600


On Jul 1, 2008, at 8:53 AM, JongAm Park wrote:

Hello, all.

Can anyone help me to figure out an issue regarding to a status menu width issue on Tiger?
The project I work on is for the Tiger and the Leopard.


I used this code to set an icon, which is longer horizontally than vertically, and it worked on the Leopard.

NSStatusBar *statusBar = [NSStatusBar systemStatusBar];

// Because it is a eps version of our company's name, it is longer horizontally. So, I used
// NSVariableStatusItemLength instead of NSSquareStatusItemLength
statusBarItem = [[statusBar statusItemWithLength: NSVariableStatusItemLength] retain];


[statusBarItem setImage:inactiveCompanyImage];
[statusBarItem setEnabled:YES];
[statusBarItem setToolTip:@"Blah blah.."];
[statusBarItem setHighlightMode:YES];

It works nicely with the Leopard, but our support team people say that it doesn't with the Tiger.
I'm suspicious if they use a small status bar program for displaying CPU temperature, etc.
(During the ToolBox era, I noticed such a case.. )


I would appreciate any help.

Thank you.

In my status menu I set the width a little larger than the image, I seem to recall needing to do that to make the spacing between items look right, but I'm not sure now. In the line below change the number at the end to make things look right (8.0 is what I'm using).


statusBarItem = [[statusBar statusItemWithLength: ([inactiveCompanyImage size].width + 8.0)] retain];

There is also a setLength: method if you change the image size later in your program.

--Nathan


_______________________________________________

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: [Q] Status Bar icon and Tiger
      • From: JongAm Park <email@hidden>
    • Re: [Q] Status Bar icon and Tiger
      • From: JongAm Park <email@hidden>
    • Re: [Q] Status Bar icon and Tiger
      • From: JongAm Park <email@hidden>
References: 
 >[Q] Status Bar icon and Tiger (From: JongAm Park <email@hidden>)

  • Prev by Date: PDF printing now blurry
  • Next by Date: Re: Why aren't my bindings firing?
  • Previous by thread: Re: [Q] Status Bar icon and Tiger
  • Next by thread: Re: [Q] Status Bar icon and Tiger
  • Index(es):
    • Date
    • Thread