フィルターのクリア

how to create Dual listbox which transfers items on selection and button press?

2 ビュー (過去 30 日間)
Tamfor Dulin
Tamfor Dulin 2014 年 11 月 19 日
コメント済み: Tamfor Dulin 2014 年 11 月 19 日
So I am trying to create a kind of system where one can be able to transfer items to the other listbox but pressing those buttons. For example this menu in Microsoft words.
And this is my simple GUI I used GUIDE to build
But now my only problem is how to code each listbox and push button to work together seamlessly.

採用された回答

sfreeman
sfreeman 2014 年 11 月 19 日
編集済み: sfreeman 2014 年 11 月 19 日
Fill the callback functions of the pushbuttons.
The code for button left to right will include for example:
cList1 = get(hList1,'String');
nSelection = get(hList1,'Value');
cList2 = get(hList2,'String');
cList2 = [cList2 cList1(nSelection)];
set(hList2,'String',cList2);
I assume, you will add some comfort functionality, like sorting the list, preserve actual selection etc.
Btw - I do not know anybody in large scale GUI generation using GUIDE for final code. IMHO creating the GUI by code gives you a better basis for coding the functionality.
  1 件のコメント
Tamfor Dulin
Tamfor Dulin 2014 年 11 月 19 日
Thank you I will try to use this and see where I can get with this.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by