how to change charactors of the table which is made by uitable by codes

1 Ansicht (letzte 30 Tage)
vx2008
vx2008 am 16 Dez. 2015
Kommentiert: Walter Roberson am 19 Dez. 2015
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);
Now I want to change the 5th row's font and background by adding some codes, shall I?
Thank you!

Antworten (1)

Walter Roberson
Walter Roberson am 16 Dez. 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 Kommentare
vx2008
vx2008 am 18 Dez. 2015
Ok, I get it
Thank you for your guiding.
Sorry for any confusing to you.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu App Building finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by