got it.
is needed in the Frame OnInit method and
is needed to do the actual work.
' intercept all menu events And Log them in this custom event handler PushEventHandler(New MyEvtHandler.Create(Self))
is needed in the Frame OnInit method and
' A small helper type which intercepts all menu events And logs them Type MyEvtHandler Extends wxEvtHandler Field frame:MyFrame Method Create:MyEvtHandler(_frame:MyFrame) frame = _frame Return MyEvtHandler(CreateHandler()) End Method Method OnInit() Connect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, OnMenuEvent) End Method Function OnMenuEvent(event:wxEvent) DebugLog "Popup Menu item Chosen" Select event.GetId() Case Menu_Add_SelectorType DebugLog "You clicked on ADD" ' Case ID_lb2 ' DebugLog "You clicked on Fred!" End Select ' MyEvtHandler(event.parent).frame.LogMenuEvent(event) event.Skip() End Function End Type
is needed to do the actual work.