I’m attempting to create a log-in window inside an NSMenu (attached to the an NSStatusItem in the menu bar).
I have blank NSMenuItems in the menu. I then set the views of the menu items to NSTextFields.
It ends up looking like this:

The textfields also interact strangely. Clicking on them only gives them focus (so you can enter text) about 30% of the time.
So, I’m wondering:
-How do do I make these look better? How do I control the padding, etc?
-What’s with the clicking behavior I described above? Typing only works 30% of the time.
-Are there any other apps that use such a statusbar item as a field? I’d like to take a look.
To answer your actual question instead of discussing the UI design…
Alternative:
Consider using the
MAAttachedWindowproject from Matt Gemmel:Download the
use an MAAttachedWindow with an NSStatusItemexample.Link:
http://mattgemmell.com/source/index.html
Quickly created example:

Used controls:
– NSTextField (Focus:
NoneDrawsBackground:NoTextColor:White)– NSButton (Bezel:
Recessed)– NSLabel (TextColor:
White)