Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8231449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:29:46+00:00 2026-06-07T17:29:46+00:00

I try to hide a NSMenuItem but the method doesn’t work. My NSMenuItem is

  • 0

I try to hide a NSMenuItem but the method doesn’t work. My NSMenuItem is not nil (-setTitle, -setEnabled work as expected). Outlet is connected correctly in the IB and -setAutoEnableItem is set to NO.

But [item setHidden:YES]; doesn’t change anything. Do you have an idea how to hide a NSMenuItem?

To remove and add the item again is no option for me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:29:47+00:00Added an answer on June 7, 2026 at 5:29 pm

    NSMenuItem hide problems are due to alternate items. If item have alternate item or items it can’t be hidden. But You can solve it like this:

    For example You want to hide item2 with alternate items itemAlt2 and itemCtrl2. So make itemAlt2 and itemCtrl2 not alternates and hidden like this:

    [itemAlt2 setAlternate: NO];
    [itemAlt2 setHidden: YES];
    [itemCtrl2 setAlternate: NO];
    [itemCtrl2 setHidden: YES];
    [item2 setHidden: YES];
    

    And when You need visible item2 just make them alternate and visible like this:

    [itemAlt2 setAlternate: YES];
    [itemAlt2 setHidden: NO];
    [itemCtrl2 setAlternate: YES];
    [itemCtrl2 setHidden: NO];
    [item2 setHidden: NO];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to hide all widgets in layout. But looks like findChildren doesn't work
i try to show and hide divs on click but something isnt going wel
I try to hide the text with a button click, not sure how it
I try .show and auto hide other showing div. But i cant run it.
I try to build a really simple screensaver, but it is not as easy
i have an element in my page. <div id=element>try</div> I want hide it when
i try to use jQuery.noConflict() but in window.load function i get a $ is
Is there any way to hide protocol conforming from an end user? I'll try
I try to hide treecols in treeview in XUL by setting style to display:
i try to hide the form in c# on startup... what i want is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.