T1663R
T1663R

Reputation: 35

Swift - NSMenu closes when clicking outside of menu

so i have a simple NSMenu. It is attached to a Status Item Button. When i click the Button it pops Open. Now my Problem is that as soon as i click outside of the NSMenu, it closes. How can i avoid that ? I did try many things but cant get that to work.

The reason i need that is that when the user clicks something in the NSMenu, another window opens, and while this window is open i also want the NSMenu to stay open. But it just does not work.

I feel like its impossible.

Many Thanks in advance.

Upvotes: 2

Views: 607

Answers (1)

nyitguy
nyitguy

Reputation: 608

I believe you have to create a custom view that pops up but something that could be done natively with just NSMenu.

Upvotes: 0

Related Questions