#NEWLINE# def _scroll( self , scroll_y ) : #NEWLINE# #INDENT# if ( self . row_height is None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# self . _scroll_y = scroll_y #NEWLINE# scroll_y = ( 1 - min ( 1 , max ( scroll_y , 0 ) ) ) #NEWLINE# container = self . container #NEWLINE# mstart = ( ( container . height - self . height ) * scroll_y ) #NEWLINE# mend = ( mstart + self . height ) #NEWLINE# rh = self . row_height #NEWLINE# istart = int ( ceil ( ( mstart / rh ) ) ) #NEWLINE# iend = int ( floor ( ( mend / rh ) ) ) #NEWLINE# istart = max ( 0 , ( istart - 1 ) ) #NEWLINE# iend = max ( 0 , ( iend - 1 ) ) #NEWLINE# if ( istart < self . _wstart ) : #NEWLINE# #INDENT# rstart = max ( 0 , ( istart - 10 ) ) #NEWLINE# self . populate ( rstart , iend ) #NEWLINE# self . _wstart = rstart #NEWLINE# self . _wend = iend #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( iend > self . _wend ) : #NEWLINE# #INDENT# self . populate ( istart , ( iend + 10 ) ) #NEWLINE# self . _wstart = iend #NEWLINE# self . _wend = ( iend + 10 )