フィルターのクリア

App designer tie in loops videos?

1 回表示 (過去 30 日間)
Stephnie Watson
Stephnie Watson 2018 年 11 月 16 日
コメント済み: Stephnie Watson 2018 年 11 月 19 日
Do you know of a good video or explanation on how to connect the input from drop down, check boxes and insert boxes to mean a specific thing that would then be input into another search function part of the code? I can't seem to find anything by googling and Matlab examples are all singles, which would be a lot of unnecessary repeat coding.
So for example, I would want the code to let me know that the city, province and country chosen, with the specific check boxes of water and climate would mean certain terms would be generated, that would then be input into the google search.

回答 (1 件)

Cris LaPierre
Cris LaPierre 2018 年 11 月 17 日
Each component has properties that you can access from any callback. For example, if I have a drop down, a check box and an edit box, I could access the selected/entered value in a callback as follows:
% DropDown
value = app.DropDown.Value;
item = app.DropDown.Items(value)
% EditField
value = app.EditField.Value;
% Button
value = app.Button.Value;
% CheckBox
value = app.CheckBox.Value;
Your code can then use these values to create your desired results.
Here's an example of a button that, when pressed, populates a list box (SelectedListBox) with with values from a second list box (ListBox)
% Button pushed function: Button
function ButtonPushed(app, event)
app.SelectedListBox.Items = [app.SelectedListBox.Items app.ListBox.Value];
end
  2 件のコメント
Cris LaPierre
Cris LaPierre 2018 年 11 月 17 日
Stephnie Watson
Stephnie Watson 2018 年 11 月 19 日
Thanks Cris, I had looked at the link but was still unclear how it all works, which is why I am looking for a video that shows how to incorporate these all together to see a visual of an actual example occuring.

サインインしてコメントする。

カテゴリ

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