How to add data to a GUI table that was loaded from a file?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Jan
el 11 de Feb. de 2013
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.
Respuesta aceptada
Jan
el 11 de Feb. de 2013
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Specifying Target for Graphics Output en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!