def On_AddItem( self, event):
self.SetStatusText( "" )
newitemname = ''
prompt = 'Enter the name for the new item:'
title = 'Add New Item'
dlg = wxTextEntryDialog( self, prompt, title )
if dlg.ShowModal() == wxID_OK:
newitemname = dlg.GetValue()
self.listbox.InsertItems( [newitemname], self.listbox.GetSelection()
Re: [wxPython] deleting a listbox item causes an application error
> For some reason, I'm getting an application error when I attempt to
> delete an item from a list box. I'm running windows NT 4.0 sp 5.
> My code is below. Its a listbox with a button to add an item and a
> button to delete the selected item. Pressing the delete button causes
> the application error.
> Have I just missed something really obvious?
Are you using the released version or an interim build? I think this was
something that was fixed shortly after 2.1.11 was released. (And it doesn't