def bounds(widget):
    """
    Get bounding box of widget relative to its parent

    :param widget: widget whose bounds are to be determined
    :return: bound tuple ``(x1, y1, x2, y2)`` representing position
        of widget within its parent
    """
    widget.update_idletasks()
    return (widget.winfo_x(), widget.winfo_y(),
            widget.winfo_x() + widget.winfo_width(), widget.winfo_y() + widget.winfo_height())