DataTypeEditor.py
changeset 379 e4c26ee9c998
parent 313 9266d1e6e3d4
child 389 6a72016d721a
equal deleted inserted replaced
377:c41acb1465ee 379:e4c26ee9c998
   161                     grid.SetReadOnly(row, col, True)
   161                     grid.SetReadOnly(row, col, True)
   162                 
   162                 
   163                 grid.SetCellEditor(row, col, editor)
   163                 grid.SetCellEditor(row, col, editor)
   164                 grid.SetCellRenderer(row, col, renderer)
   164                 grid.SetCellRenderer(row, col, renderer)
   165                 
   165                 
   166                 if row in self.Errors and self.Errors[row][0] == colname.lower():
   166                 if self.Errors.has_key(row) and self.Errors[row][0] == colname.lower():
   167                     grid.SetCellBackgroundColour(row, col, wx.Colour(255, 255, 0))
   167                     grid.SetCellBackgroundColour(row, col, wx.Colour(255, 255, 0))
   168                     grid.SetCellTextColour(row, col, wx.RED)
   168                     grid.SetCellTextColour(row, col, wx.RED)
   169                     grid.MakeCellVisible(row, col)
   169                     grid.MakeCellVisible(row, col)
   170                 else:
   170                 else:
   171                     grid.SetCellTextColour(row, col, wx.BLACK)
   171                     grid.SetCellTextColour(row, col, wx.BLACK)
   202 
   202 
   203     def ClearErrors(self):
   203     def ClearErrors(self):
   204         self.Errors = {}
   204         self.Errors = {}
   205 
   205 
   206 #-------------------------------------------------------------------------------
   206 #-------------------------------------------------------------------------------
   207 #                          Configuration Editor class
   207 #                          Datatype Editor class
   208 #-------------------------------------------------------------------------------
   208 #-------------------------------------------------------------------------------
   209 
   209 
   210 [ID_DATATYPEEDITOR, ID_DATATYPEEDITORSTATICBOX,
   210 [ID_DATATYPEEDITOR, ID_DATATYPEEDITORSTATICBOX,
   211  ID_DATATYPEEDITORDERIVATIONTYPE, ID_DATATYPEEDITORDIRECTLYPANEL,
   211  ID_DATATYPEEDITORDERIVATIONTYPE, ID_DATATYPEEDITORDIRECTLYPANEL,
   212  ID_DATATYPEEDITORSUBRANGEPANEL, ID_DATATYPEEDITORDIRECTLYBASETYPE, 
   212  ID_DATATYPEEDITORSUBRANGEPANEL, ID_DATATYPEEDITORDIRECTLYBASETYPE,