フィルターのクリア

combine 2 string to a listbox

3 ビュー (過去 30 日間)
Rahma Yeni
Rahma Yeni 2012 年 4 月 18 日
Hello... Like my question in http://www.mathworks.com/matlabcentral/answers/31729-make-history, I want to combine string from a popupmenu and 2 edittexts.. Example: the strings of popupmenu are
apple
mango
grapes
Then when i choose "mango", and in an edit text, i make the value is 80, in listbox it will be "mango, 80".. But, only "mango" and "grapes" that have edittext.. where, "mango" and "grapes" take the value from their text field. How i can combine them..?? i illustrate it like this http://www.flickr.com/photos/rye_ni/6969686871/. I have try to use these code, but they're not work..
pmFruitVal = get(handles.pmFruit, 'Value');
pmFruitStr = get(handles.pmFruit, 'string');
pmFruitSlc = pmFruitStr {pmFruitVal };
valFruit = str2num(get(handles.eFruit, 'String'));
if (pmFruitVal >1)
handles.cnt = handles.cnt + 1;
histstr = horzcat(pmFruitSlc, ', ', valFruit);
handles.history{handles.cnt} = histstr;
set(handles.listFruit, 'string', handles.history);
end
guidata(hObject,handles);
I really need your help.. i have try all of my ability.. But i can't get it.. Thank You.. :)

回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Report Generator についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by