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]) |