Resize Font Column Header on uitable inside GUI

I have a uitable inside a GUI. I managed to change the font size of its contexts, but not of the headers, I just want to make my letters "bigger", that's it.
I know I can change the format of the contents with html format, but I could not do it with the headers.
Any ideas welcome.
Thanks in advance
Jordi

 채택된 답변

Sean de Wolski
Sean de Wolski 2012년 10월 9일

0 개 추천

t = uitable('Data',magic(3));
set(t,'ColumnName',{'1','Hello','<h1>World</h1>'})

댓글 수: 2

Thanks Sean !!! Using .html the code gets longer but it definitely works !!!
You could define them as variables to make it more easy to read:
hs = '<h1>' %html start
he = '</h1>' %html end
cn = {'1', 'hello', 'world'}; %original
cnh = cellfun(@(x)[hs x he],cn,'uni',false); %with html
set(t,'ColumnName',cnh) %apply

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

추가 답변 (2개)

Jordi Riba
Jordi Riba 2012년 10월 12일

0 개 추천

Hi Sean,
Thanks for the 2nd reply! It made it even better!
I realized that I could use it also to change color to some values appearing in my uitable, however I have the problem of converting the desired numbers into characters inside the array that will appear on the uitable.
I tried different options but all of them were not working.
Any ideas on how I should achieve it please?
Many many thanks in advance

댓글 수: 1

Pleadse post this as a new question with some example code so we can reproduce it.

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

Jordi Riba
Jordi Riba 2012년 10월 12일

0 개 추천

Hi Sean,
Thanks for the reply!!!
Basically I managed to convert it myself and bring the data + the html format back to the matrix.
Thanks anyway !!!
Jordi

카테고리

도움말 센터 및 File Exchange에서 App Building에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by