multiple lines in static text box
The following code I have used is for displaying the string in a static text box which is present in a GUI designed using MATLAB.Since, the output is genersted during runtime only the last line is displayed.For example,
function matchin
handles = guidata(gcbo);
set(handles.h_text,’String’,’performing matching…’);
[image1, pathname]= uigetfile(‘*.bmp’,’Open An Fingerprint image’);
Directory = fullfile (‘C:’,’Users’,’ADMIN’,’Documents’,’MATLAB’);
set(handles.h_text,’String’,’matching complete…’);
D = dir(fullfile(Directory,’*.bmp’));
for i = 1:numel(D)
if isequal(image1,D(i).name)
set(handles.h_text,’String’,’matched’);
else
set(handles.h_text,’String’,’not matched’);
end
end
If I select the second image out of three images it is displaying
not matched
matched
not matched
in the matlab command window but, the static text box in GUI is displaying
not matched
How can I display multiple lines in the static text box?The following code I have used is for displaying the string in a static text box which is present in a GUI designed using MATLAB.Since, the output is genersted during runtime only the last line is displayed.For example,
function matchin
handles = guidata(gcbo);
set(handles.h_text,’String’,’performing matching…’);
[image1, pathname]= uigetfile(‘*.bmp’,’Open An Fingerprint image’);
Directory = fullfile (‘C:’,’Users’,’ADMIN’,’Documents’,’MATLAB’);
set(handles.h_text,’String’,’matching complete…’);
D = dir(fullfile(Directory,’*.bmp’));
for i = 1:numel(D)
if isequal(image1,D(i).name)
set(handles.h_text,’String’,’matched’);
else
set(handles.h_text,’String’,’not matched’);
end
end
If I select the second image out of three images it is displaying
not matched
matched
not matched
in the matlab command window but, the static text box in GUI is displaying
not matched
How can I display multiple lines in the static text box? The following code I have used is for displaying the string in a static text box which is present in a GUI designed using MATLAB.Since, the output is genersted during runtime only the last line is displayed.For example,
function matchin
handles = guidata(gcbo);
set(handles.h_text,’String’,’performing matching…’);
[image1, pathname]= uigetfile(‘*.bmp’,’Open An Fingerprint image’);
Directory = fullfile (‘C:’,’Users’,’ADMIN’,’Documents’,’MATLAB’);
set(handles.h_text,’String’,’matching complete…’);
D = dir(fullfile(Directory,’*.bmp’));
for i = 1:numel(D)
if isequal(image1,D(i).name)
set(handles.h_text,’String’,’matched’);
else
set(handles.h_text,’String’,’not matched’);
end
end
If I select the second image out of three images it is displaying
not matched
matched
not matched
in the matlab command window but, the static text box in GUI is displaying
not matched
How can I display multiple lines in the static text box? matlab gui, static text MATLAB Answers — New Questions