Exemplo n.º 1
0
 def onAddEntry(self,evt):
   dlg = DictionaryEntryDialog(self)
   if (dlg.ShowModal() == DICTIONARYENTRY_BUTTONCOMMIT_ID):
     name = dlg.name()
     definition = dlg.definition()
     idx = self.GetItemCount()
     self.InsertStringItem(idx,name)
     self.SetStringItem(idx,1,definition)
Exemplo n.º 2
0
 def onAddEntry(self, evt):
     dlg = DictionaryEntryDialog(self)
     if (dlg.ShowModal() == DICTIONARYENTRY_BUTTONCOMMIT_ID):
         name = dlg.name()
         definition = dlg.definition()
         idx = self.GetItemCount()
         self.InsertStringItem(idx, name)
         self.SetStringItem(idx, 1, definition)
Exemplo n.º 3
0
 def onEntryActivated(self,evt):
   self.theSelectedIdx = evt.GetIndex()
   name = self.GetItemText(self.theSelectedIdx)
   definition = self.GetItem(self.theSelectedIdx,1)
    
   dlg = DictionaryEntryDialog(self,name,definition.GetText())
   if (dlg.ShowModal() == DICTIONARYENTRY_BUTTONCOMMIT_ID):
     self.SetStringItem(self.theSelectedIdx,0,dlg.name())
     self.SetStringItem(self.theSelectedIdx,1,dlg.definition())
Exemplo n.º 4
0
    def onEntryActivated(self, evt):
        self.theSelectedIdx = evt.GetIndex()
        name = self.GetItemText(self.theSelectedIdx)
        definition = self.GetItem(self.theSelectedIdx, 1)

        dlg = DictionaryEntryDialog(self, name, definition.GetText())
        if (dlg.ShowModal() == DICTIONARYENTRY_BUTTONCOMMIT_ID):
            self.SetStringItem(self.theSelectedIdx, 0, dlg.name())
            self.SetStringItem(self.theSelectedIdx, 1, dlg.definition())