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!