#NEWLINE# def add_widget( self , widget , index = 0 ) : #NEWLINE# #INDENT# content = self . content #NEWLINE# if ( content is None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# parent = widget . parent #NEWLINE# if self : #NEWLINE# #INDENT# parent . remove_widget ( widget ) #NEWLINE# #UNINDENT# if ( widget in ( content , self . _tab_layout ) ) : #NEWLINE# #INDENT# super ( TabbedPanel , self ) . add_widget ( widget , index ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( widget , TabbedPanelHeader ) : #NEWLINE# #INDENT# self_tabs = self . _tab_strip #NEWLINE# self_tabs . add_widget ( widget , index ) #NEWLINE# widget . group = ( '__tab%r__' % self_tabs . uid ) #NEWLINE# self . on_tab_width ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# widget . pos_hint = { #NEWLINE# #INDENT# 'x' : 0 , #NEWLINE# 'top' : 1 , #NEWLINE# #UNINDENT# } #NEWLINE# self . _childrens . append ( widget ) #NEWLINE# content . disabled = self . current_tab . disabled #NEWLINE# content . add_widget ( widget , index )