Question

I am creating a Status Bar application which requires a URL being entered in a text field. The text field is a subview of the NSMenuItem. The problem I am facing though is that the value of the text field cannot be changed and only "indirectly highlighted" (it's not the normal blue highlighting but a grey one and only occurs when double clicking the value of the text field).

Does someone know why this is?The text field hasn't been disabled by me, but it seems to apply read only properties or something...

Was it helpful?

Solution

It's most likely your menu has "Auto Enables Items" turned on. With this on (the default), your menu items have to have an action and a target to be enabled, which is likely disabling their contents (your NSTextField). Turn it off and you should be fine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top