def GetGPXtreeItemId(G2frame, parentId, itemText):
    """Find the tree item that matches the text in itemText starting with parentId

    :param wx.Frame G2frame: Data tree frame object
    :param wx.TreeItemId parentId: tree item to start search with
    :param str itemText: text for tree item
    """
    item, cookie = G2frame.GPXtree.GetFirstChild(parentId)
    while item:
        if G2frame.GPXtree.GetItemText(item) == itemText:
            return item
        item, cookie = G2frame.GPXtree.GetNextChild(parentId, cookie)
    return 0
