Reputation: 124
"Toggle Sidebar" is the only item I have added, how do I remove the other items which I don't really need? I'm stuck
I'm on macOS 12.2 with wxWidgets v3.1.5
here's the code I used to add the menu:
wxMenuBar *mainMenuBar = new wxMenuBar();
wxMenu *viewMenu = new wxMenu();
viewMenu->Append(wxID_ANY, "Toggle Sidebar");
mainMenuBar->Append(viewMenu, "&View");
this->SetMenuBar(mainMenuBar);
Upvotes: 1
Views: 169
Reputation: 22688
In (not yet, but to be soon, released) wx 3.1.7 this won't happen by default any longer, as this issue just got resolved.
Upvotes: 2
Reputation: 124
As said in the comments, calling SetMenuBar()
on the frame first and then appending the menus fixed the issue.
Upvotes: 0