(self, widget)
Look for the tab child which is or ultimately contains the supplied
        widget
Look for the tab child which is or ultimately contains the supplied
        widget
Look for the tab child which is or ultimately contains the supplied widget
def find_tab_root(self, widget):
        """Look for the tab child which is or ultimately contains the supplied
        widget"""
        parent = widget.get_parent()
        previous = parent

        while parent is not None and parent is not self:
            previous = parent
            parent = parent.get_parent()

        if previous == self:
            return(widget)
        else:
            return(previous)
def find_tab_root ( self , widget ) : parent = widget . get_parent ( ) previous = parent while parent is not None and parent is not self : previous = parent parent = parent . get_parent ( ) if previous == self : return ( widget ) else : return ( previous )