How to declare variable in App Designer
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Good morning.
1. I declare in App Designer the text variable A
properties (Access = private)
A = 'text'
end
2. When I push Button I call the variable A and display its value in Command Window
% Button pushed function: Button
function ButtonPushed(app, event)
text = app.A
end
In this way everything is okay.
But I can not deal with the problem, how to do that the value of variable A is not declared as a written text but it is taken as a value of EditField (Text)
% Callback function
function EditFieldValueChanged(app, event)
value = app.EditField.Value;
end
Thank you for your help.
0 Kommentare
Antworten (1)
Mohammad Sami
am 7 Jan. 2022
Do you mean you want to set the value of A equal to the value of edit field ?
app.A = app.EditField.Value;
Siehe auch
Kategorien
Mehr zu Environment and Settings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!