Next / Previous / Contents / TCC Help System / NM Tech homepage

14.16. PickList.__pickHandler(): Someone clicked on a color name

This method is called when the user clicks on a color name. The argument is the line number within the pick list. It passes the corresponding color through to the class's callback function.

huey
# - - -   P i c k L i s t . _ _ p i c k H a n d l e r   - -

    def __pickHandler ( self, linex ):
        """Handler for user click on a color name.
        """
        #-- 1 --
        color  =  self.__colorList[linex]

        #-- 2 --
        if  self.__callback is not None:
            self.__callback ( color )