Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / June 2007



Tip: Looking for answers? Try searching our database.

How to get Window on top of all?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lorenzo - 17 Jun 2007 22:05 GMT
I have an NSStatusItem and I would like for its prefs window (NSWindow
not an NSPanel) to appear above all others when shown. Instead, it will
appear behind whatever window is currently the key window. How do I make
mine appear above all?
TIA

Signature

"My Break-Dancing days are over, but there's always the Funky Chicken"
--The Full Monty

MuahMan - 17 Jun 2007 22:52 GMT
Windows is already on top of all!  OS X is dead with it's 2% market share.
LOL@ Mactards!
Patrick Machielse - 17 Jun 2007 23:58 GMT
> I have an NSStatusItem and I would like for its prefs window (NSWindow
> not an NSPanel) to appear above all others when shown. Instead, it will
> appear behind whatever window is currently the key window. How do I make
> mine appear above all?

The best solution is probably to make the application that owns the
status item the active application:

[NSApp activateIgnoringOtherApps:YES];
[preferenceWindow makeKeyAndOrderFront:nil];

'normal' programs are already active when the user clicks a menu item,
but that is not the case with status items.

patrick
Lorenzo - 18 Jun 2007 01:18 GMT
> [NSApp activateIgnoringOtherApps:YES];

Thanks, that's it. I guess because its not a 'normal' application, I
didn't think to look at the NSApplication class.

Signature

"My Break-Dancing days are over, but there's always the Funky Chicken"
--The Full Monty

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.