#NEWLINE# def removeTab( self , index ) : #NEWLINE# #INDENT# self . checkTabIndex ( index ) #NEWLINE# toRemove = self . panel . getWidget ( ( index + 1 ) ) #NEWLINE# if ( toRemove == index . selectedTab ) : #NEWLINE# #INDENT# self . selectedTab = None #NEWLINE# #UNINDENT# self . panel . remove ( toRemove )