+
+ def TestRemove(self, evt):
+ mb = self.GetMenuBar()
+ submenuItem = mb.FindItemById(601)
+ if not submenuItem:
+ return
+ submenu = submenuItem.GetMenu()
+ menu = submenu.GetParent()
+
+ #menu.Remove(504) # works
+ menu.RemoveItem(mb.FindItemById(504)) # this also works
+ #menu.RemoveItem(submenuItem) # doesn't work, as expected since submenuItem is not on menu
+
+
+ def TestRemove2(self, evt):
+ mb = self.GetMenuBar()
+ mb.Remove(4)
+
+
+ def TestUpdateUI(self, evt):
+ text = time.ctime()
+ evt.SetText(text)
+
+
+ def TestInsert(self, evt):
+ # get the menu
+ mb = self.GetMenuBar()
+ menuItem = mb.FindItemById(507)
+ menu = menuItem.GetMenu()
+
+ ID = wxNewId()
+ ##menu.Insert(9, ID, "NewItem " + str(ID))
+ item = wxMenuItem(menu)
+ item.SetId(ID)
+ item.SetText("NewItem " + str(ID))
+ menu.InsertItem(9, item)
+
+
+