function setfont(RespObj,Name,varargin)
%SETFONT  Set font properties of RespObj text objects
%         (title,xlabel,ylabel,axes,iolabels)

%   Author(s): A. DiVergilio
%   Copyright 1986-2000 The MathWorks, Inc. 
%   $Revision: 1.4 $  $Date: 2000/06/14 20:07:32 $

switch lower(Name)
case 'title'
   h = RespObj.Handles.Title;
case 'xlabel'
   h = RespObj.Handles.Xlabel;
case 'ylabel'
   h = RespObj.Handles.Ylabel;
case 'axes'
   h = RespObj.PlotAxes;
   %---Also set any CST grid text
    ch = allchild(h); 
    if iscell(ch), ch = cat(1,ch{:}); end
    set(findobj(ch,'flat','Type','text','Tag','CSTgridLines'),varargin{:});
case 'iolabels'
   pa = RespObj.PlotAxes;
   ht = get(pa,{'Title'});
   hx = get(pa,{'XLabel'});
   hy = get(pa,{'YLabel'});
   h = [ht{:};hx{:};hy{:}];
end

%---Set font properties
set(h,varargin{:});

%---Update label positions
labelpos(RespObj);
