#NEWLINE# def select( self , index ) : #NEWLINE# #INDENT# self . deselect ( ) #NEWLINE# self . selected_index = index #NEWLINE# if ( index is not None ) : #NEWLINE# #INDENT# item = self . items [ self . selected_index ] #NEWLINE# item . state = 'selected' #NEWLINE# self . on_selected ( self , item , index ) #NEWLINE# if isinstance ( self . parent , scroll . ScrollView ) : #NEWLINE# #INDENT# cy = ( self . frame . centery + self . frame . top ) #NEWLINE# if ( ( cy > self . parent . frame . h ) or ( cy < 0 ) ) : #NEWLINE# #INDENT# percentage = ( item . frame . top / float ( self . frame . h ) ) #NEWLINE# self . parent . set_content_offset ( self . parent . _content_offset [ 0 ] , percentage )