• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: about Panels and windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: about Panels and windows


  • Subject: Re: about Panels and windows
  • From: Jeremy Dronfield <email@hidden>
  • Date: Fri, 26 Jul 2002 18:16:55 +0100

On Friday, July 26, 2002, at 09:48 am, Cristian Savu wrote:

1. I want to always have the panels floating over the main window (never to
be send behind it)

2. I want the panels to float ONLY over the main window (not over another
applications windows)

It's not quite clear what you want. Are you referring to their floating status when another application becomes active? If so, do something like the following in your app delegate (or in some other class that's registered itself to observe the relevant notifications):

- (void)applicationWillResignActive:(NSNotification *)aNotification
{
int index;
for (index = 0; index < [[NSApp windows] count]; index++) {
[[[NSApp windows] objectAtIndex:index] setFloatingPanel:NO];
}
}

- (void)applicationDidBecomeActive:(NSNotification *)aNotification
{
int index;
for (index = 0; index < [[NSApp windows] count]; index++) {
[[[NSApp windows] objectAtIndex:index] setFloatingPanel:YES];
}
}

I haven't actually tested this with NSPanels; I've done it with -setLevel: on NSWindows. It should leave your mainWindow alone. I'll be interested to know if it works.
- Jeremy.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >about Panels and windows (From: "Cristian Savu" <email@hidden>)

  • Prev by Date: Re: Metallic Windows ... Is Apple Breakin' the Rules?
  • Next by Date: Re: Metallic Windows ... Is Apple Breakin' the Rules?
  • Previous by thread: about Panels and windows
  • Next by thread: Re: about Panels and windows
  • Index(es):
    • Date
    • Thread