What rules determine whether a frame gets its own menu bar, or inherits one from another frame? More specifically, under what circumstances will frame.SetMenuBar() be ignored? I somehow ended up with one window that always inherits the parent’s menubar when launched from another frame, but not when started by itself. However, all of the other frames in my app are okay, and I can’t figure out how to reproduce the problem. It only happens on Macs - the Linux version has its own menubar as expected. I assume I’m leaving out something,
I don't think that there should ever be a time that SetMenuBar is ignored, unless I suppose if the menu given to it is not valid. My understanding on how the frames/menubars are implemented on Mac is that the menubar will always be the one associated with the active wxFrame. Are you sure that the frame in question is active (is the foremost window and contains some widget with the focus) at the time that some other frame's menu is shown?
Please make a runnable, small as possible, sample application that demonstrates the problem and let us know the wx version. MakingSampleApps - wxPyWiki
···
On 5/3/11 11:28 AM, Nat Echols wrote:
What rules determine whether a frame gets its own menu bar, or inherits
one from another frame? More specifically, under what circumstances
will frame.SetMenuBar() be ignored? I somehow ended up with one window
that always inherits the parent's menubar when launched from another
frame, but not when started by itself. However, all of the other frames
in my app are okay, and I can't figure out how to reproduce the problem.
It only happens on Macs - the Linux version has its own menubar as
expected. I assume I'm leaving out something,