MATLAB Answers

Matlab uitable column font size using html not working

89 views (last 30 days)
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:
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!!


Guillaume on 8 Jul 2019
Is there any documentation that says that html is supposed to be interpreted in a uitable?

Sign in to comment.

Accepted Answer

Yair Altman
Yair Altman on 8 Jul 2019
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.


Sign in to comment.

More Answers (1)

Guillaume on 8 Jul 2019
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).


Sign in to comment.

Sign in to answer this question.