how can I modify uitable cells
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi I need to be able to enter values in uitable cells (like in excel) but I don't find how to make the cells editable
this is my uitableMy_CreateFcn but still can not edit cells
UI_TABLE_EXCITATION_NUM_OF_LINES = 3;
UI_TABLE_EXCITATION_HEADERS = { 'aaa[W]','bbb[W]','ccc[gr]','ddd[gr]','eee[%]',...
'fff[%]','ggg[C]'};
% set header
set( hObject,'ColumnName', UI_TABLE_EXCITATION_HEADERS);
% set data
set( hObject,'data', cell(UI_TABLE_EXCITATION_NUM_OF_LINES, size(UI_TABLE_EXCITATION_HEADERS,2)));
% set cell format
set(hObject,'ColumnFormat',{'numeric' 'numeric' 'numeric' 'numeric' 'numeric' 'numeric' 'numeric'});
0 Commenti
Risposte (1)
Azzi Abdelmalek
il 27 Dic 2012
Modificato: Azzi Abdelmalek
il 27 Dic 2012
set(t,'ColumnEditable',logical(1))
Example
t = uitable;
set(t,'Data',ones(5,3))
set(t,'ColumnWidth',{100})
set(t,'ColumnEditable',logical([1 0 1]))
% the first and third column are editable , the second is not.
0 Commenti
Vedere anche
Categorie
Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!