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!