Re: wxEuphoria - MDI window menu ordering
- Posted by Greg Haberek <ghaberek at gma??.com> Feb 29, 2008
- 588 views
Matt Lewis wrote: > > Have you tried using the index parameter when you create the wxMenu? > <a > href="http://wxeuphoria.sourceforge.net/docs/WXMENU.html">http://wxeuphoria.sourceforge.net/docs/WXMENU.html</a> > > Alternatively, you could probably create the menus before the > wxMDIParentFrame. > > Matt Here's a modified version of the mdi.exw demo:
include wxeud.e without warning constant parent = create( wxMDIParentFrame, {0, -1, "The Parent MDI Frame", -1, -1, 600, 480}), menubar = create( wxMenuBar, parent ), client = create( wxMDIClientWindow, parent ), children = { create( wxMDIChildFrame, {parent, -1, "Child 1"}), create( wxMDIChildFrame, {parent, -1, "Child 2"}), create( wxMDIChildFrame, {parent, -1, "Child 3"}), create( wxMDIChildFrame, {parent, -1, "Child 4"}) }, file = create( wxMenu, {menubar, "&File", 0, 0} ), file_exit = create( wxMenuItem, {file, wxID_EXIT, "E&xit"} ) procedure parent_onClose( atom this, atom event_type, atom id, atom event ) exit_main() end procedure set_event_handler( parent, -1, wxEVT_CLOSE_WINDOW, routine_id("parent_onClose") ) procedure file_exit_onClick( atom this, atom event_type, atom id, atom event ) exit_main() end procedure set_event_handler( file, wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, routine_id("file_exit_onClick") ) wxMain( parent )
The File menu still appears after the Window menu, despite being given an index of zero. And I don't know how to create the menus before the wxMDIParentFrame, since that control is the parent of everything else... Also, I've found that if I create the menubar after the wxMDIChildFrames, all the child windows are sized to their smallest dimensions (effectively {0,0}) but if I create the menubar before the wxMDIChildFrames, the child windows are all their default size of {390,232}. -Greg