NSWindow - 显示将始终保持在当前窗口顶部的新窗口 [英] NSWindow - show new window that will always stay on top of current window

查看:1012
本文介绍了NSWindow - 显示将始终保持在当前窗口顶部的新窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让我的NSWindow显示新窗口,它总是在当前窗口的顶部。

I want my NSWindow to show new window(s) that will always be on top of current window. they should NOT be on top of other windows.

此外,当原始窗口移动时,它们不应移动。

In addition, they should not move when the original window moves.

如何做到这一点?

推荐答案

使用 NSWindow s addChildWindow:ordered: setParentWindow:方法将另一个窗口添加为第一个窗口的子项。该窗口将在第一个窗口之后。请参见 NSWindow类参考

Use NSWindow's addChildWindow:ordered: or setParentWindow: method to add the other window as a child of the first window. That window will follow the first window around. See the NSWindow Class Reference.

这篇关于NSWindow - 显示将始终保持在当前窗口顶部的新窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆