How can I clear the UIFigure label area? It gives the error: "Unrecognized property 'Text' for class 'matlab.ui.Figure' ".
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ali Deniz
el 29 de Jun. de 2022
Comentada: Ali Deniz
el 29 de Jun. de 2022
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 comentarios
Respuesta aceptada
NIVEDITA MAJEE
el 29 de Jun. de 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!
Más respuestas (0)
Ver también
Categorías
Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!