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

조회 수: 1 (최근 30일)
vx2008
vx2008 2015년 12월 16일
댓글: Walter Roberson 2015년 12월 19일
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!

답변 (1개)

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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by