I have this working
I can display the menu.
I can click the menu.
I need to do something on each item.
I think something like this:
The Select/Case/End Select will give me an individual action.
What do i need to do to link this method with the items from the menu?
Cheers
Glenn
Function OnContextMenu(event:wxEvent) Local frame:MyFrame = MyFrame(event.parent) Local x:Int, y:Int wxContextMenuEvent(event).GetPosition(x, y) ' This line makes sure the popup menu is positioned where the mouse is. frame.ScreenToClient(x, y) ' This line displays the popup menu frame.ShowContextMenu(x, y) End Function Method ShowContextMenu(x:Int, y:Int) Local menu:wxMenu = New wxMenu.Create() menu.Append(Menu_Add_SelectorType, "Add a NEW Selector Type") menu.Append(Menu_Edit_SelectorType, "Edit the highlighted Selector Type") menu.AppendSeparator() menu.Append(Menu_Delete_SelectorType, "Delete the highlighted Selector Type") PopupMenu(menu, x, y) menu.Free() End Method
I can display the menu.
I can click the menu.
I need to do something on each item.
I think something like this:
Method ClickedpopupItem(event:wxMenuItem) DebugLog "Popup Menu item Chosen" Select event.GetId() Case Menu_Add_SelectorType DebugLog "You clicked on ADD" End Select End Method
The Select/Case/End Select will give me an individual action.
What do i need to do to link this method with the items from the menu?
Cheers
Glenn