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.
With the toolbar of one app, hover over the green window button. You'll see a pop-up asking you to choose a tile format. Once you choose one, it will be replicated within your Spaces.
If you want Tot's window to float above other windows on the Mac desktop, use the "Display as Floating Window" item in the Window menu. Note that the Window menu is only visible when you're using Tot with a Dock icon. You'll need to turn off the menu bar icon temporarily to change it.
Move the pointer over an item on the screen, then press the activation modifier (by default, the Command key) to display the Hover Text window. If you set the option to be able to lock the window, quickly press the modifier key three times to keep the Hover Text window on the screen.
To make the active window always on top, press Ctrl + Spacebar (or the keyboard shortcut you assigned). Press the keyboard shortcut again to disable “always on top” for the active window. For script options, right-click on the AutoHotkey icon in the system tray.
You can change the window's windowLevel (via -setLevel:) to NSFloatingWindowLevel.
[window setLevel:NSFloatingWindowLevel];
Documentation is here: Window_Levels
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".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With