parameters: (self, attribute, colourVal, maxVal, position)
docstring: Common code to handle spin control changes.
docstring_summary: Common code to handle spin control changes.
docstring_tokens: Common code to handle spin control changes .
function: def AssignColourValue(self, attribute, colourVal, maxVal, position):
          """ Common code to handle spin control changes. """
  
          originalVal = getattr(self._colour, attribute)
          if colourVal != originalVal and self._initOver:
              
              if colourVal < 0:
                  colourVal = 0
              if colourVal > maxVal:
                  colourVal = maxVal
  
              setattr(self._colour, attribute, colourVal)
              if position < 3:
                  self._colour.ToHSV()
              else:
                  self._colour.ToRGB()
  
              self.DrawAll()
function_tokens: def AssignColourValue ( self , attribute , colourVal , maxVal , position ) : originalVal = getattr ( self . _colour , attribute ) if colourVal != originalVal and self . _initOver : if colourVal < 0 : colourVal = 0 if colourVal > maxVal : colourVal = maxVal setattr ( self . _colour , attribute , colourVal ) if position < 3 : self . _colour . ToHSV ( ) else : self . _colour . ToRGB ( ) self . DrawAll ( )