• 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: Can NSStatusItem contain NSTextField ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can NSStatusItem contain NSTextField ?


  • Subject: Re: Can NSStatusItem contain NSTextField ?
  • From: Peter Maurer <email@hidden>
  • Date: Mon, 15 Nov 2004 10:19:43 +0100

I am trying to put a text input field into the menubar...

Some have suggested they are just drawing a bordlerless window on top of the menubar vs. embedding it. Before iSeek was bought by Ambrosia it was just a floating borderless window so that might lead credence to that argument.

Right. As far as I remember, the NSWindow subclass that contains NSStatusItems refuses to become key window. That's why I did indeed solve this via borderless window in <shameless plug, can't resist>Butler/Another Launcher's web search menu item, which was the first editable text field in OS X's menu bar, AFAIK</shameless plug, couldn't resist>. I tend to think that Ambrosia did it the same way, but you never know...


There's another (theoretical) way of doing this: You could try to sub-subclass the above-mentioned (private!) NSWindow subclass, override the appropriate methods, and make your app use your sub-subclass by sending a poseAsClass message. However, I think this will only work if those windows are created by your application (as opposed to SystemUIServer or something like that), which I've just never tested. Has anyone ever tried to do it this way?

Anyway, the borderless-window trick seems like the safer route to me.

Cheers,

Peter.

___
http://www.petermaurer.de/butler

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


References: 
 >Can NSStatusItem contain NSTextField ? (From: Phillip Moore <email@hidden>)

  • Prev by Date: Re: Trouble comparing NSCalendarDates
  • Next by Date: Re: Making a window the size of the desktop?
  • Previous by thread: Re: Can NSStatusItem contain NSTextField ?
  • Next by thread: *Editable* rotated text
  • Index(es):
    • Date
    • Thread