How can I clear the UIFigure label area? It gives the error: "Unrecognized property 'Text' for class 'matlab.ui.Figure' ".
조회 수: 3 (최근 30일)
이전 댓글 표시
function UITableCellSelection(app, event)
global t
indices = event.Indices;
n=indices(1);
% Information and the Images of the Missiles
if strcmp(t.System{n},"MIM-23A HAWK")
app.UIFigure.Text = "";
cla(app.UIAxes)
imshow("MIM_23A_HAWK.jpg","Parent",app.UIAxes)
MsgString = {'Raytheon tarafından geliştirilen sistem'};
WrapString=textwrap(MsgString, 70);
uilabel(app.UIFigure,"Text",WrapString,"Position",[531 17 368 279])
elseif strcmp(t.System{n},"CAMM")
app.UIFigure.Text = "";
cla(app.UIAxes)
imshow("CAMM.jpg","Parent",app.UIAxes)
MsgString = "Common Anti-air Modular Missile - CAMM ya da deniz ortamında kullanılan Sea Ceptor";
WrapString=textwrap(MsgString, 70);
uilabel(app.UIFigure,"Text",WrapString,"Position",[531 17 368 279])
elseif strcmp(t.System{n},"CAMM-ER")
app.UIFigure.Text = "";
cla(app.UIAxes)
imshow("CAMM_ER.jpg","Parent",app.UIAxes)
MsgString = "Orta menzilli karatabanlı hava savunma ";
WrapString=textwrap(MsgString, 65);
uilabel(app.UIFigure,"Text",WrapString,"Position",[531 17 368 279])
I want to clear at each time the label area. But it doesn't. And it is shown like the figure above. When I write the "app.UIFigure.Text = '' ;", I get the error "Unrecognized property 'Text' for class 'matlab.ui.Figure' ". What can I do? Thank you.
댓글 수: 0
채택된 답변
NIVEDITA MAJEE
2022년 6월 29일
Hi Ali,
You can make use of Text Area from the component library for displaying your message. You can place this text area in a defined place in your app. Then you can do the following in each of your else conditions:
MsgString = "The message you want to print";
app.TextArea.Value = MsgString; % app.TextArea is the text area placed in the app
This will print only the given message in that text area.
Hope this helps!
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!