1. wxEuphoria - MDI window menu ordering

When I create a wxMDIParentFrame, etc. the "Window" menu becomes the first menu.
Any menus I create after that are appended to the end. It looks really weird
having "Window File Edit" on the menu bar.

How do I get my menus behind the Window menu?

-Greg

new topic     » topic index » view message » categorize

2. Re: wxEuphoria - MDI window menu ordering

Greg Haberek wrote:
> 
> 
> When I create a wxMDIParentFrame, etc. the "Window" menu becomes the first
> menu.
> Any menus I create after that are appended to the end. It looks really weird
> having "Window File Edit" on the menu bar.
> 
> How do I get my menus behind the Window menu?

Have you tried using the index parameter when you create the wxMenu?
http://wxeuphoria.sourceforge.net/docs/WXMENU.html

Alternatively, you could probably create the menus before the wxMDIParentFrame.

Matt

new topic     » goto parent     » topic index » view message » categorize

3. Re: wxEuphoria - MDI window menu ordering

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

new topic     » goto parent     » topic index » view message » categorize

4. Re: wxEuphoria - MDI window menu ordering

Greg Haberek wrote:
> 
> 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:

I don't know much about wxEuphoria but looking at the WXMENU.E include file

The menu function insert_menuitem() has the 
 member call wxMenuBase_Insert for WIN32 COMMENTED OUT.

Therefore insert menu wont work on Windows. 

Bernie

My files in archive:
WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » goto parent     » topic index » view message » categorize

5. Re: wxEuphoria - MDI window menu ordering

Bernie Ryan wrote:
> 
> I don't know much about wxEuphoria but looking at the WXMENU.E include file
> 
> The menu function insert_menuitem() has the 
>  member call wxMenuBase_Insert for WIN32 COMMENTED OUT.
> 
> Therefore insert menu wont work on Windows. 

I don't think you're looking at the proper version of wxEuphoria. The lastest
and past few releases only have a single include file, wxeud.e

-Greg

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu