copy the item in drop-down list of app designer

2 ビュー (過去 30 日間)
Yu Li
Yu Li 2018 年 12 月 29 日
編集済み: Yu Li 2019 年 1 月 4 日
Hi:
is there any way to copy the item in drop-down list of app designer?
Thanks!
Yu
  2 件のコメント
Alok Nimrani
Alok Nimrani 2019 年 1 月 2 日
Hi Yu,
Is it that you want to make a duplicate item by copying an existing one from the drop-down list? If not, could you please elaborate on your use-case and also the end goal that you are trying to achieve?
Thanks,
Alok
Yu Li
Yu Li 2019 年 1 月 2 日
Hi:
thanks for your reply.
the app will generate search over several folders and display the folder that possible contains the best solution. then these folder names will be shown in the drop down list.
I want to copy these folder path and then use 'cd' to go to these folders.
Thanks!
Yu

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

回答 (1 件)

Alok Nimrani
Alok Nimrani 2019 年 1 月 4 日
Hi Yu,
In order to get the folder names displayed in the drop down list, you can create a cell array containing these items as follows:
>> nameList = app.DropDown.Items;
where 'DropDown' is the name of the drop down object that you want to use.
In addition, you can get only the current selected value as follows:
>> currentValue = app.DropDown.Value;
Hope this helps.
Regards,
Alok
  1 件のコメント
Yu Li
Yu Li 2019 年 1 月 4 日
編集済み: Yu Li 2019 年 1 月 4 日
thanks for your reply. yes, this is a way to do that, but what I want is:
  1. move the mouse pointer to that drop-down list.
  2. right-click and there appears a 'copy' selection.
this step is like what we copy-paste file in a windows system, which may make the app more interactive.
Thanks!
Yu

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

カテゴリ

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