Matlab uitable column font size using html not working

조회 수: 16 (최근 30일)
Alexandru Bitca
Alexandru Bitca 2019년 7월 8일
편집: Eric Delgado 2023년 10월 5일
I have a uitable within a uipanel.
I'm trying to change the column header font size using following HTML code:
'ColumnName',{'<HTML><FONT size=10>Metric</FONT></HTML>','<HTML><FONT size=10>Value</FONT></HTML>'}
I get:
Capture.JPG
I've tried changing the HMTL code to:
'ColumnName',{'<HTML><FONT size="10">Metric</FONT></HTML>','<HTML><FONT size="10">Value</FONT></HTML>'}
'ColumnName',{'<HTML><FONT size="+10">Metric</FONT></HTML>','<HTML><FONT size="+10">Value</FONT></HTML>'}
Nothing works, keep getting the contents of the cell as the text in the column headers.
What am I doing wrong?
Mathworks, uitable needs to have native support to change font sizes for column and row names, this html solution is too janky!!
Thanks,
Alex.
  댓글 수: 3
Guillaume
Guillaume 2019년 7월 8일
이동: Voss 2023년 9월 20일
All of the solutions you link apply to the old style uitable (in a figure). As far as I know there's no documented or undocumented way of setting the header font of an app designer uitable (in a uifigure).

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

채택된 답변

Yair Altman
Yair Altman 2019년 7월 8일
HTML is only supported out-of-the-box in the legacy (Java-based) figures, not the new web-based (AppDesigner) uifigures.
You may wish to try out R2019b, which might possibly have a partial solution for your needs. I'm afraid that I cannot be more specific because 19b is still in beta mode and not officially released yet.

추가 답변 (2개)

Nicholas Fugal
Nicholas Fugal 2020년 6월 10일
To make things even worse, the font size of the headers changes from something small in 2019b to something large in 2020a. With no way of adjusting the font properties it means that uitables designed in 2019b will likely require a re-layout in 2020a because of the larger text.
MathWorks, PLEASE give us a way for format the headers!

Eric Delgado
Eric Delgado 2023년 10월 5일
편집: Eric Delgado 2023년 10월 5일
ccTools provides customization of a lot of components (including the header of an uitable). See example in page 15 of the doc.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by