function setHeaderWidth(h, widthInfo)
%

% Copyright 2017 The MathWorks, Inc.
% no need to do any work if the view has no properties
if ~isempty(h.Properties)
    h.disableLiveliness;
    sizeInfo = jsondecode(widthInfo);
    sizefields = fields(sizeInfo);
    for i= 1:numel(sizefields)
        propertyName = strrep(sizefields{i},'_','.');
        index = find(strcmpi(get(h.Properties, 'Name'), propertyName));
        if ~isempty(index)
             property = h.Properties(index);
             property.Width = sizeInfo.(sizefields{i});
        end
    end
    h.enableLiveliness;
end