Popup menu issue on Mac with wxPython 3.0.0

Hi,

When a menu is popped up near the bottom of the screen, normally it’s given position goes from being the top left, to being the bottom left (if it’s height doesn’t fit).

This doesn’t happen with wxPython 3.0.0 cocoa (I didn’t test carbon). Instead, if the menu doesn’t fit on the screen, it either doesn’t get shown at all, or sometimes you get some strange wrapping to the top.

Sample app attached. If you leave only one menu item, the menu will be shown.

The platform is:

  • MacOS X 10.7.5

  • Python 2.7.6

  • wxPython 3.0.0 cocoa

Confirmed in both 32 and 64 bit mode. It works as expected with wxPython 2.8.

Regards,

Toni

popup_menu_test.py (650 Bytes)

Forgot to mention that this happens with fullscreen frames when the menu’s parent is the frame. If behaves differently when you set the button as the parent. Now that I played around with the sample app in non-fullscreen mode, it seems that the bottom left of the menu is set to the top left of the frame – so that’s why it wasn’t visible in fullscreen mode.

···

On Friday, January 17, 2014 3:34:57 PM UTC+1, Toni Ruža wrote:

Sample app attached. If you leave only one menu item, the menu will be shown.

Toni

The behavior of the sample app is as expected if you use menu.PopupMenuXY(m, 0, 0) to show the popup.

···

Toni

On Friday, January 17, 2014 3:47:24 PM UTC+1, Toni Ruža wrote:

On Friday, January 17, 2014 3:34:57 PM UTC+1, Toni Ruža wrote:

Sample app attached. If you leave only one menu item, the menu will be shown.

Forgot to mention that this happens with fullscreen frames when the menu’s parent is the frame. If behaves differently when you set the button as the parent. Now that I played around with the sample app in non-fullscreen mode, it seems that the bottom left of the menu is set to the top left of the frame – so that’s why it wasn’t visible in fullscreen mode.

Toni