#NEWLINE# def add( self , widget , text = None ) : #NEWLINE# #INDENT# 'Add a new tab' #NEWLINE# tab = NotebookTab ( self , text , widget ) #NEWLINE# self . _tab_order . append ( tab ) #NEWLINE# x = ( 4 if ( len ( self . _tab_order ) == 1 ) else ( self . _tab_order [ ( - 2 ) ] . x1 + 8 ) ) #NEWLINE# self . canvas . coords ( tab . text_object , ( x , 4 ) ) #NEWLINE# bbox = self . canvas . bbox ( 'all' ) #NEWLINE# height = ( bbox [ 3 ] + 2 ) #NEWLINE# self . canvas . configure ( height = height ) #NEWLINE# self . tabs [ text ] = tab #NEWLINE# self . redraw ( text )