function setstatus(figHandle, string)
%SETSTATUS Set the status text string in a figure.
%	SETSTATUS(FIGHANDLE, STRING) sets the 'String' property
%	of the uicontrol text object with 'Tag' equal to
%	'Status', if one exists.
%
%	SETSTATUS(STRING) is equivalent to SETSTATUS(gcf,
%	STRING). 

%	Steven L. Eddins, 1 July 1994
%	Copyright (c) 1984-94 by The MathWorks, Inc.
%	$Revision: 1.5 $  $Date: 1994/12/27 16:01:52 $

error(nargchk(1,2,nargin));

if (nargin == 1)
  string = figHandle;
  figHandle = gcf;
end

statusBar = findobj(get(figHandle, 'Children'), 'flat', 'Tag', 'Status');
if (~isempty(statusBar))
  set(statusBar, 'String', string);
end
