views:

36

answers:

2

hi, i trying to make a osx application that just have one window and it will always on the top of screen. anyone knows how to achieve it? thanks.

A: 

By "on the top", do you mean you do not want your window to be obscured, even if a different app is active? In that case, one way is to start with the NSPanel template in Interface Builder, check the "Utility" option, and uncheck "Hide on Deactivate".

JWWalker
+3  A: 

You can change the window's windowLevel (via -setWindowLevel:) to NSFloatingWindowLevel.

Documentation is here: Window_Levels

Alan Rogers
thank you. it works so well :D
xhan