Submenu rendering issue

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
thoray
Knows some wx things
Knows some wx things
Posts: 48
Joined: Sun Oct 18, 2015 9:31 am

Submenu rendering issue

Post by thoray »

bug2.png
bug2.png (10.75 KiB) Viewed 1463 times
I add the following piece of code at line 478 of samples/opengl/cube/cube.cpp:

Code: Select all

// Add  menu
wxMenu* secondmenu = new wxMenu;
secondmenu->Append(8999, wxT("&Item")); // removing this makes submenu draw correctly..

// Add Submenu to Second menu (this doesn't draw correctly in Windows OS)
wxMenu *submenu = new wxMenu;
submenu->AppendRadioItem(9000, wxT("Item 1"));
secondmenu->AppendSubMenu(submenu, wxT("&Submenu"));

// Append Second menu to menubar
menuBar->Append(secondmenu, wxT("Second"));
And in Windows virtual machine the submenu does not render correctly as it does not draw the submenu over the canvas. Cube.exe was cross-compiled with mingw and I'm using Wx 3.0.2. It renders correctly in GTK version.
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Submenu rendering issue

Post by doublemax »

Stuff like this happens with OpenGL windows, i'm not sure anything can be done about this.

In any case, this is a user forum. For bug reports please open a ticket at http://trac.wxwidgets.org/
Use the source, Luke!
thoray
Knows some wx things
Knows some wx things
Posts: 48
Joined: Sun Oct 18, 2015 9:31 am

Re: Submenu rendering issue

Post by thoray »

I was finally able to run it in native Windows 7 and submenus rendered correctly. So it is probably only a VM bug.
Post Reply