Ejemplo n.º 1
0
 def OnAdd(self, event):
     dlg = Entry.MyFileEntry(self, tr("Interpreter Path"),
                             tr("Enter the interpreter path"), '')
     answer = dlg.ShowModal()
     if answer == wx.ID_OK:
         path = dlg.GetValue()
         if len(path) > 0:
             i = self.list.GetItemCount()
             self.list.InsertStringItem(i, 'Change the description')
             self.list.SetStringItem(i, 1, path)
             self.list.EditLabel(i)
Ejemplo n.º 2
0
 def OnModify(self, event):
     if self.list.GetSelectedItemCount() > 1:
         dlg = wx.MessageDialog(self, tr("You can select only one item"),
                                tr("Modify Interpreter Path"),
                                wx.OK | wx.ICON_INFORMATION)
         dlg.ShowModal()
         return
     item = self.list.GetNextItem(-1, wx.LIST_NEXT_ALL,
                                  wx.LIST_STATE_SELECTED)
     dlg = Entry.MyFileEntry(self, tr("Interpreter Path"),
                             tr("Enter the interpreter path"),
                             self.getItemText(item)[1])
     answer = dlg.ShowModal()
     if answer == wx.ID_OK:
         path = dlg.GetValue()
         if len(path) > 0:
             self.list.SetStringItem(item, 1, path)