DataTypeEditor.py
changeset 640 c32c169b8f63
parent 636 44978a2b9703
child 654 f8445d00613d
--- a/DataTypeEditor.py	Thu Feb 02 01:08:57 2012 +0100
+++ b/DataTypeEditor.py	Thu Feb 02 16:12:26 2012 +0100
@@ -363,7 +363,7 @@
         self.EnumeratedValues = CustomEditableListBox(id=ID_DATATYPEEDITORENUMERATEDVALUES, 
               name='EnumeratedValues', parent=self.EnumeratedPanel, label=_("Values:"), pos=wx.Point(0, 0),
               size=wx.Size(0, 0), style=wx.gizmos.EL_ALLOW_NEW | wx.gizmos.EL_ALLOW_EDIT | wx.gizmos.EL_ALLOW_DELETE)
-        self.EnumeratedValues.GetListCtrl().Bind(wx.EVT_LIST_END_LABEL_EDIT, self.OnEnumeratedValueEndEdit)
+        setattr(self.EnumeratedValues, "_OnLabelEndEdit", self.OnEnumeratedValueEndEdit)
         for func in ["_OnAddButton", "_OnDelButton", "_OnUpButton", "_OnDownButton"]:
             setattr(self.EnumeratedValues, func, self.OnEnumeratedValuesChanged)
         
@@ -394,8 +394,7 @@
         self.ArrayDimensions = CustomEditableListBox(id=ID_DATATYPEEDITORARRAYDIMENSIONS, 
               name='ArrayDimensions', parent=self.ArrayPanel, label=_("Dimensions:"), pos=wx.Point(0, 0),
               size=wx.Size(0, 24), style=wx.gizmos.EL_ALLOW_NEW | wx.gizmos.EL_ALLOW_EDIT | wx.gizmos.EL_ALLOW_DELETE)
-        self.ArrayDimensions.GetListCtrl().Bind(wx.EVT_LIST_END_LABEL_EDIT, self.OnDimensionsChanged)
-        for func in ["_OnAddButton", "_OnDelButton", "_OnUpButton", "_OnDownButton"]:
+        for func in ["_OnLabelEndEdit", "_OnAddButton", "_OnDelButton", "_OnUpButton", "_OnDownButton"]:
             setattr(self.EnumeratedValues, func, self.OnDimensionsChanged)
         
         self.staticText10 = wx.StaticText(id=ID_DATATYPEEDITORSTATICTEXT10,