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 1984-2000 The Mathworks, Inc. 
%  $Revision: 1.11 $  $Date: 2000/06/02 04:41:52 $

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
