Adding an icon to Top Menu Bar

Discussion in 'Mac Programming' started by robj, Dec 25, 2009.

  1. robj macrumors regular

    Joined:
    Dec 23, 2009
    Location:
    Madrid, Spain
    #1
    How can I make an Application that adds an icon to Top Menu Bar?

    Which are the first steps I should take?

    I don't even know where to start :)

    Thanks.
     
  2. GorillaPaws macrumors 6502a

    GorillaPaws

    Joined:
    Oct 26, 2003
    Location:
    Richmond, VA
    #2
    This might be a good place to start. Unless I'm misunderstanding what you're trying to do.
     
  3. robj thread starter macrumors regular

    Joined:
    Dec 23, 2009
    Location:
    Madrid, Spain
    #3
    Thanks for replying :)

    I think that I didn't explain myself very well

    I have done a little search and now I can call the things with their names ;)

    What I actually wanted to do is to add a NSStatusItem to system NSStatusBar.
    And to response myself, the way to do it is using something like:

    Code:
    NSStatusItem* item = [[NSStatusBar systemStatusBar] statusItemWithLength:65.0];
    [item setTitle:@"Test"];
    
     
  4. ziggyonice macrumors 68020

    ziggyonice

    Joined:
    Mar 12, 2006
    Location:
    Rural America
    #4
    Please consider allowing the user to enable/disable this icon. While having an icon in the menu bar can sometimes be convenient for a commonly used application, it can get to be rather cluttered when there's developers who don't allow their users to remove the icon.
     

Share This Page