How can I clear the UIFigure label area? It gives the error: "Unrecognized property 'Text' for class 'matlab.ui.Figure' ".

7 views (last 30 days)
function UITableCellSelection(app, event)
global t
indices = event.Indices;
% Information and the Images of the Missiles
if strcmp(t.System{n},"MIM-23A HAWK")
app.UIFigure.Text = "";
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 = "";
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 = "";
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.

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)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!