• 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
Disable (grey out) main menu when displaying modal window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Disable (grey out) main menu when displaying modal window?


  • Subject: Disable (grey out) main menu when displaying modal window?
  • From: Darren Wheatley <email@hidden>
  • Date: Tue, 25 Jan 2011 08:45:47 +0000
  • Thread-topic: Disable (grey out) main menu when displaying modal window?

Hi,

I load a custom file import window in my Cocoa app using:

[NSApp runModalForWindow:window];

The window displays just fine, and is modal.

However, the application main menu is still active (e.g. File menu and
items), which is making the modal display redundant.

I've googled this and searched the docs, but can't find a way to turn the
menu off.

Someone suggested using this:

NSModalSession session = [NSApp beginModalSessionForWindow:window];
[NSApp runModalSession];

- but that doesn't seem to work either. Again, the window displays but the
main menu is still active.

Can anyone suggest how I turn the main menu off (grey out all menu items)
when displaying a modal window please?

Thanks

Darren.


_______________________________________________

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Disable (grey out) main menu when displaying modal window?
      • From: Darren Wheatley <email@hidden>
  • Prev by Date: Re: Loading the Foundation at runtime
  • Next by Date: Re: lots of find/replace in text file
  • Previous by thread: Re: WebKit WebArchive Create but no Load?
  • Next by thread: Re: Disable (grey out) main menu when displaying modal window?
  • Index(es):
    • Date
    • Thread