开发者

Open NSPanel with button click in the PDE

I have a custom PDE with a button on it and I'd like to show a new NSPanel when I click on it. When I use orderFront or makeKeyAndOrderFront functions, the panel appears but under the print dialog window and has no focus, I can't make anything. When I use runModelForWindow function, the panel appears over the window and seems to be ok, but first this is modal and I'd like panel not to be modal and when I click on the red button to close the panel it disappears but the main print开发者_如何学JAVA dialog has no focus and I can't make anything with that, even close the app.

Please help me. I'm newbie on Mac programming.


I've found it:

[panel setLevel:CGShieldingWindowLevel()];
[panel setWorksWhenModal:YES];
[panel makeKeyAndOrderFront:self];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜