controls/VariablePanel.py
changeset 831 dec885ba1f2b
parent 830 4b9df5bea400
child 853 0f97bddb5a30
equal deleted inserted replaced
830:4b9df5bea400 831:dec885ba1f2b
   202                         grid.SetReadOnly(row, col, True)
   202                         grid.SetReadOnly(row, col, True)
   203                 
   203                 
   204                 grid.SetCellEditor(row, col, editor)
   204                 grid.SetCellEditor(row, col, editor)
   205                 grid.SetCellRenderer(row, col, renderer)
   205                 grid.SetCellRenderer(row, col, renderer)
   206                 
   206                 
   207                 if colname == "Location" and LOCATION_MODEL.match(self.GetValueByName(row, "Location")) is None:
   207                 if colname == "Location" and LOCATION_MODEL.match(self.GetValueByName(row, colname)) is None:
   208                     highlight_colours = ERROR_HIGHLIGHT
   208                     highlight_colours = ERROR_HIGHLIGHT
   209                 else:
   209                 else:
   210                     highlight_colours = row_highlights.get(colname.lower(), [(wx.WHITE, wx.BLACK)])[-1]
   210                     highlight_colours = row_highlights.get(colname.lower(), [(wx.WHITE, wx.BLACK)])[-1]
   211                 grid.SetCellBackgroundColour(row, col, highlight_colours[0])
   211                 grid.SetCellBackgroundColour(row, col, highlight_colours[0])
   212                 grid.SetCellTextColour(row, col, highlight_colours[1])
   212                 grid.SetCellTextColour(row, col, highlight_colours[1])