How to add data to a GUI table that was loaded from a file?
조회 수: 1 (최근 30일)
이전 댓글 표시
So, I was able to create an option that allows user to load data from a specified file (listdlg with list of files) and present it in GUI table. I did it by putting: set(handles.uitable1,'Data',specifiedFile) in pushbutton callback.
The thing is, now I have the loaded data and the remaining spaces in blank (I set the GUI table with 500 lines).
Now I want to new data, but the remaining spaces don't hold the values that I introduce. They just go blank again after I add values.
How can I fix this?
Sorry for my bad English.
Thanks!
댓글 수: 5
Jan
2013년 2월 11일
I still do not understand, what the problem is. Perhaps it helps, when you post some code. Omit unecessary details like the loading, but use RAND() to concentrate on the problem.
"The values added don't hold" is not helpful. How have you added the data and what causes them to vanish? We cannot guess what's going on.
채택된 답변
Jan
2013년 2월 11일
Replacing the ortiginal Data seems to be a bad idea. What about inserting the new values?
Data = cell(20, 2);
h = uitable('Data', Data);
...
newData = {rand, rand; rand, rand};
Data = get(h, 'Data');
Data(1:size(newData, 1), :) = newData;
set(h, 'Data', Data);
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!