how to change charactors of the table which is made by uitable by codes
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I use the below code to get a table as below:
f=figure('Position',[0 60 130+C*80,30+R*20]);
t=uitable(f,'Data',Cdata,...
'ColumnName',cname,...
'RowName',rname);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/152682/image.png)
Now I want to change the 5th row's font and background by adding some codes, shall I?
Thank you!
0 commentaires
Réponses (1)
Walter Roberson
le 16 Déc 2015
row5 = cellfun(@(S) sprintf('<HTML><FONT face="helvetica" color="red">%s</FONT>', Cdata(5,:);
new_Cdata = Cdata;
new_Cdata(5,:) = row5;
set(t, 'Data', new_Cdata);
6 commentaires
Walter Roberson
le 19 Déc 2015
For making each column the same blank-padded length see http://www.mathworks.com/matlabcentral/answers/71812-for-uitable-backgroundcolor-for-row#comment_142953
Voir également
Catégories
En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!