How can I clear the UIFigure label area? It gives the error: "Unrecognized property 'Text' for class 'matlab.ui.Figure' ".
3 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
NIVEDITA MAJEE
on 29 Jun 2022
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!
More Answers (0)
See Also
Categories
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!