function index = getMenuIndexFromLabel( menu, label )
    itemNames = get( menu, 'String' );
    numNames = length(itemNames);
    for i=1:numNames
        if strcmp( itemNames{i}, label )
            index = i;
            return;
        end
    end
    index = 0;
end
