Lots of demo tweaks for API updates, bug fixes and new images for the

wxListbook demo


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-11-21 07:36:53 +00:00
parent 5c0ccabf02
commit fbd5dd1dfa
31 changed files with 638 additions and 116 deletions

View File

@@ -208,17 +208,26 @@ check the source for this sample to see how to implement them.
def TestInsert(self, evt):
theID = 508
# get the menu
mb = self.GetMenuBar()
menuItem = mb.FindItemById(507)
menuItem = mb.FindItemById(theID)
menu = menuItem.GetMenu()
# figure out the position to insert at
pos = 0
for i in menu.GetMenuItems():
if i.GetId() == theID:
break
pos += 1
# now insert the new item
ID = wxNewId()
##menu.Insert(9, ID, "NewItem " + str(ID))
##menu.Insert(pos, ID, "NewItem " + str(ID))
item = wxMenuItem(menu)
item.SetId(ID)
item.SetText("NewItem " + str(ID))
menu.InsertItem(9, item)
menu.InsertItem(pos, item)