Is there anyway to 'autosize' the listdlg menu?

조회 수: 4 (최근 30일)
Flávio
Flávio 2013년 2월 4일
I want to create a listdlg depending on some sort of data. The thing is, the user can create new data and add it to the listdlg. But I need a way to adapt the size.
For exemple, I have a listdlg with options: A,B,C, create new letter
If the user chooses to create new letter D, next time letter E will be an option.
Is there any way to do this?
Thanks!
  댓글 수: 4
Flávio
Flávio 2013년 2월 4일
The user introduces data and saves it in .mat file. Then I create a Liststring that is evaluated with new data and adds it to listdlg.
The goal is to do it like this, I'm not sure if I can!
Walter Roberson
Walter Roberson 2013년 2월 4일
You cannot add a new Liststring onto the existing one in a listdlg(), but you can add new cells onto the cell array that you pass in as the Liststring parameter.

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2013년 2월 4일
S = {'A' 'B' 'C'};
listbox('Liststring', S);
S{end+1} = 'D';
listbox('Liststring', S)

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by