| | 542 | def editKeys(self, objs, prop, val=[]): |
|---|
| | 543 | # Create a list of keys. 'val' may be a list of existing keys |
|---|
| | 544 | obj = objs[0] |
|---|
| | 545 | class KeysDialog(dabo.ui.dOkCancelDialog): |
|---|
| | 546 | def addControls(self): |
|---|
| | 547 | self.editor = dabo.ui.dEditableList(self, Choices=val, |
|---|
| | 548 | Caption=_("Editing keys for '%s'") % prop) |
|---|
| | 549 | self.Sizer.append1x(self.editor) |
|---|
| | 550 | |
|---|
| | 551 | dlg = KeysDialog(self, Modal=True) |
|---|
| | 552 | dlg.show() |
|---|
| | 553 | if dlg.Accepted: |
|---|
| | 554 | newVal = dlg.editor.Choices |
|---|
| | 555 | self.propGrid.CurrentValue = newVal |
|---|
| | 556 | self.updateVal(prop, newVal, list) |
|---|
| | 557 | self.propGrid.refresh() |
|---|
| | 558 | dlg.release() |
|---|
| | 559 | |
|---|
| | 560 | |
|---|