Use wx popup window for menus

Using own written code does not work on mac