(self, widget)
return tabnum
Find the tabnum of the tab containing a widget at any level
Find the tabnum of the tab containing a widget at any level
Find the tabnum of the tab containing a widget at any level
def page_num_descendant(self, widget):
        """Find the tabnum of the tab containing a widget at any level"""
        tabnum = self.page_num(widget)
        dbg("widget is direct child if not equal -1 - tabnum: %d" % tabnum)
        while tabnum == -1 and widget.get_parent():
            widget = widget.get_parent()
            tabnum = self.page_num(widget)
        dbg("found tabnum containing widget: %d" % tabnum)
        return tabnum
def page_num_descendant ( self , widget ) : tabnum = self . page_num ( widget ) dbg ( "widget is direct child if not equal -1 - tabnum: %d" % tabnum ) while tabnum == - 1 and widget . get_parent ( ) : widget = widget . get_parent ( ) tabnum = self . page_num ( widget ) dbg ( "found tabnum containing widget: %d" % tabnum ) return tabnum