Panel overlapping Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Frank111
Earned a small fee
Earned a small fee
Posts: 12
Joined: Thu Dec 11, 2014 3:14 am

Panel overlapping

Post by Frank111 »

Hi guys,

I'm using wxwidgets to build a windows product, and used the wxdialog to create some menus, but there is something wrong when those menus are popped up, please look the snapshot below.

Can anybody tell me what happened here? did I miss any settings for wxdialog?
Attachments
issue.png
issue.png (21.3 KiB) Viewed 1101 times
User avatar
doublemax
Moderator
Moderator
Posts: 19159
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Panel overlapping

Post by doublemax »

Usually you get overlaps like that when you don't use sizers and position windows incorrectly, so that they overlap. Overlapping siblings are not supported by wxWidgets.

Another related error source is setting the wrong parent for a window.

What do you mean with "used the panel to create some menus"? Are these wxMenu(s)? Or are you just trying to show a panel at a specific position? In the latter case, you should look at wxPopupWindow.
http://docs.wxwidgets.org/trunk/classwx ... indow.html
Use the source, Luke!
Frank111
Earned a small fee
Earned a small fee
Posts: 12
Joined: Thu Dec 11, 2014 3:14 am

Re: Panel overlapping

Post by Frank111 »

Thank you, doublemax.
I should use the wrong parent here.
Post Reply