def METHOD_NAME(self, error):
    """Handles the 'error' trait being changed."""
    if error:
        self.control.SetBackgroundColour(ErrorColor)
    else:
        self.control.SetBackgroundColour(OKColor)
    self.control.Refresh()