Help menu item duplicated on Mac. Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
fishnet37222
Experienced Solver
Experienced Solver
Posts: 74
Joined: Sat May 06, 2017 1:40 pm

Help menu item duplicated on Mac.

Post by fishnet37222 »

Hello,

I'm using wxWidgets 3.1.1 on macOS 10.13.5 Beta using the Xcode GCC compiler. I added a menu bar to my window with a menu titles "Help" and an item on that menu with an id of wxID_HELP. Instead of that menu item replacing the default "Help" item that's added to the Help menu, it's added as an additional item, so you see a disabled item and an enabled item. I've included a screen-shot and the code I'm using to create the menu. Is there something I'm missing?
2018-04-05_13-20-58.png
2018-04-05_13-20-58.png (34.07 KiB) Viewed 2771 times

Code: Select all

auto menuBar = new wxMenuBar();
auto mnuHelp = new wxMenu("Help");
mnuHelp->Append(wxID_ABOUT, "About");
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainWindow::OnAbout, this, wxID_ABOUT);
mnuHelp->Append(wxID_HELP, "Help");
this->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainWindow::OnHelp, this, wxID_HELP);
menuBar->Append(mnuHelp, "Help");
this->SetMenuBar(menuBar);
Dave F.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Help menu item duplicated on Mac.

Post by ONEEYEMAN »

Hi,
Did you look at the 'minimal' sample?

Thank you.
fishnet37222
Experienced Solver
Experienced Solver
Posts: 74
Joined: Sat May 06, 2017 1:40 pm

Re: Help menu item duplicated on Mac.

Post by fishnet37222 »

It turns out I was creating the Help menu by passing a name into the constructor for the menu. When I took that string out, the disabled help menu item disappeared.
Dave F.
Post Reply