Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Keeping a Window on Top



I'm very new to all this, so apologies for any ignorance!!!

I have looked around and am still struggling to get this to work properly - I would like my app window, which is an NSPanel (although could be something else) to stay on top of all windows of all applications - in the same way as the Force Quit window does. I have tried using setLevel with various options, but nothing seems to work, as soon as another app is clicked, it sits on top of my window!?

The best I have come up with is:
- (void)applicationDidResignActive:(NSNotification *)n {
	[NSApp activateIgnoringOtherApps:YES];
	[theDialogWindow makeKeyAndOrderFront:nil];
}

Which works, but is not very nice as it completely prevents use of other applications, which I think for a "good experience" I should allow, so in the same way as the Force Quit Window, it can lose focus, but stays on top!

Any points would be really great - thanks


Ben. _______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.