Edit Field Number in App Designer with a Workspace Variable

1 回表示 (過去 30 日間)
ALEJANDRO FERNANDEZ
ALEJANDRO FERNANDEZ 2020 年 10 月 25 日
編集済み: Mario Malic 2020 年 10 月 25 日
I'm trying to show a Workspace variable in UI using the edit field number with App Designer. Do you know if is it possible or not?

回答 (1 件)

Mario Malic
Mario Malic 2020 年 10 月 25 日
編集済み: Mario Malic 2020 年 10 月 25 日
Of course you can, you have plenty of ways to do it. Do you call a function/script in App Designer code or what?
Set a tag, or a unique name for your app in Component Browser, under UIFigure - Identifiers, and get its handle this way:
% in your script
app = get(findall(0, 'Tag', 'AppUIFigure'), 'RunningAppInstance');
Now you have app in your workspace as well, you can assign values to app objects/properties
app.EditField.Value = Variable;
% ^^^^^^^^^
% Change accordingly, this is the handle to the Edit Field component

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by