82 size=wx.Size(0, 28), style=wx.CB_READONLY) |
82 size=wx.Size(0, 28), style=wx.CB_READONLY) |
83 |
83 |
84 self.Dimensions = CustomEditableListBox(id=ID_ARRAYTYPEDIALOGDIMENSIONS, |
84 self.Dimensions = CustomEditableListBox(id=ID_ARRAYTYPEDIALOGDIMENSIONS, |
85 name='ArrayDimensions', parent=self, label=_("Dimensions:"), pos=wx.Point(0, 0), |
85 name='ArrayDimensions', parent=self, label=_("Dimensions:"), pos=wx.Point(0, 0), |
86 size=wx.Size(0, 24), style=wx.gizmos.EL_ALLOW_NEW | wx.gizmos.EL_ALLOW_EDIT | wx.gizmos.EL_ALLOW_DELETE) |
86 size=wx.Size(0, 24), style=wx.gizmos.EL_ALLOW_NEW | wx.gizmos.EL_ALLOW_EDIT | wx.gizmos.EL_ALLOW_DELETE) |
87 list_ctrl = self.Dimensions.GetListCtrl() |
87 for func in ["_OnLabelEndEdit", "_OnAddButton", "_OnDelButton", "_OnUpButton", "_OnDownButton"]: |
88 list_ctrl.Bind(wx.EVT_LIST_END_LABEL_EDIT, self.OnDimensionsChanged) |
|
89 for func in ["_OnAddButton", "_OnDelButton", "_OnUpButton", "_OnDownButton"]: |
|
90 setattr(self.Dimensions, func, self.OnDimensionsChanged) |
88 setattr(self.Dimensions, func, self.OnDimensionsChanged) |
91 |
89 |
92 self.ButtonSizer = self.CreateButtonSizer(wx.OK|wx.CANCEL|wx.CENTRE) |
90 self.ButtonSizer = self.CreateButtonSizer(wx.OK|wx.CANCEL|wx.CENTRE) |
93 if wx.VERSION >= (2, 5, 0): |
91 if wx.VERSION >= (2, 5, 0): |
94 self.Bind(wx.EVT_BUTTON, self.OnOK, id=self.ButtonSizer.GetAffirmativeButton().GetId()) |
92 self.Bind(wx.EVT_BUTTON, self.OnOK, id=self.ButtonSizer.GetAffirmativeButton().GetId()) |