gui/component.py
def reindex(self, z=None):
        "Raises/lower the component in the window hierarchy (Z-order/tab order)"
        # z=0: lowers(first index), z=-1: raises (last)
        # actually, only useful in design mode
        if isinstance(self._parent, Component):
            # get the current index (z-order)
            if not self in self._parent._children_list:
                return len(self._parent._children_list)
            i = self._parent._children_list.index(self)
            if z is None:
                return i
            if not hasattr(self, "designer") and not self.designer:
                raise RuntimeError("reindexing can only be done on design mode")
            # delete the element reference from the list
            del self._parent._children_list[i]
            # insert as last element
            if z < 0:
                self._parent._children_list.append(self)
            else:
                self._parent._children_list.insert(z, self)
def reindex(self, z=None):
        "Raises/lower the component in the window hierarchy (Z-order/tab order)"
        # z=0: lowers(first index), z=-1: raises (last)
        # actually, only useful in design mode
        if isinstance(self._parent, Component):
            # get the current index (z-order)
            if not self in self._parent._children_list:
                return len(self._parent._children_list)
            i = self._parent._children_list.index(self)
            if z is None:
                return i
            if not hasattr(self, "designer") and not self.designer:
                raise RuntimeError("reindexing can only be done on design mode")
            # delete the element reference from the list
            del self._parent._children_list[i]
            # insert as last element
            if z < 0:
                self._parent._children_list.append(self)
            else:
                self._parent._children_list.insert(z, self)
Raises/lower the component in the window hierarchy (Z-order/tab order)