function statusString = getstatus(figHandle)
%GETSTATUS Get status text string in figure.
%  STATUS = GETSTATUS(FIGHANDLE) returns the 'String'
%  property value of the uicontrol text object with 'Tag'
%  equal to 'Status'.  If such an object does not exist,
%  GETSTATUS returns [].
%
%  STATUS = GETSTATUS is equivalent to STRING =
%  GETSTATUS(gcf).
%
%  See also SETSTATUS.

%  Steven L. Eddins, October 1994
%  Copyright (c) 1984-98 by The MathWorks, Inc.
%  $Revision: 1.9 $  $Date: 1997/11/21 23:48:40 $

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

if (nargin == 0)
  figHandle = gcf;
end

statusBar = findobj(get(figHandle, 'Children'), 'flat', 'Tag', 'Status');
if (isempty(statusBar))
  statusString = [];
else
  statusString = get(statusBar(1), 'String');
end
