开发者

Only allow one NSWindow to be selectable until action is completed (Cocoa)

开发者 https://www.devze.com 2022-12-14 09:16 出处:网络
I have a program with many windows open. I want all windows to be visible, but only one window can be interactable, until a certain event has occured. e.g. pressin开发者_C百科g a button.

I have a program with many windows open. I want all windows to be visible, but only one window can be interactable, until a certain event has occured. e.g. pressin开发者_C百科g a button.

At the moment, I can still click another window, and interact with it, how do I only allow interaction with ONE window, until a certain event occurs?

Imagine this as the program:

Only allow one NSWindow to be selectable until action is completed (Cocoa)

I want only the frontmost Window to be selectable, if I try to select any of the other windows behind it, it should not work.

Does anoybody know how to do this?

Thanks!

Michael


It sounds like you want a modal window.

0

精彩评论

暂无评论...
验证码 换一张
取 消