Floating Window

Hi,

How is possible to define a Window that float all over other window palette of other apps?
I need to define a small panel in Photoshop using ASOC but when I click my image the window of my app disapper.
I ASS was simple.

Hagi

If you have a window called win, try win’s setLevel_(current application’s NSFloatingWindowLevel)

Ric

Hi Ric,

Thanks for the suggestion.
I put the line in on applicationWillFinishLaunching_(aNotification)
Nothing.
Also changed to mainWin’s setLevel_(current application’s NSScreenSaverWindowLevel)
My Cocoa friend told me thta float windows over all need to use NSScreenSaverWindowLevel
But without success. When I launch the app the window stay on top. When I switch to another app 8example photoshop) my win disappear. I would like that she stay all over the others window’s.

Hagi

Try adding win’s setHidesOnDeactivate_(0) also and see if that helps

Ric

Bingo. It works. Many many thanks!!!

Hagi

The easiest way (without any code) is to change the class of the window in Interface Builder into NSPanel
and select Utility Panel or HUD Panel from the Style popup menu

By the way, NSScreenSaverWindowLevel will put it on top of everything including alerts, so you might not want to use that level if it might obscure any alerts your app might throw up.

Hi,

Thanks for all the info.
Stefan solution need anyway to have a property linked with IB to the window, otherwise when you build and run the window appear and disappear.

Thanks again

Hagi