フィルターのクリア

I have a uitable with a ChoiceList. Is there a way to add to the ChoiceList selections other than manually using the guide?

1 回表示 (過去 30 日間)
I have a uitable with four columns. Each column is a ChoiceList with three choices avaliable i.e. "red","blue","green". Is there a way to add more choices to each ChoiceList via matlab script or is the only way using the guide and manually putting them in the ChoiceList?

回答 (1 件)

Walter Roberson
Walter Roberson 2013 年 2 月 14 日
Approximately like this:
curdata = get(handles.uitable, 'data');
for K = 1 : size(curdata, 1)
curstring = curdata{K, 3); %for column 3
curstring{end+1} = 'yellow'; %adding yellow as a choice
curdata{K,3} = curstring;
end
set(handles.uitable, 'data', curdata)

カテゴリ

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