How to display subscript for ColumnName of UITable in Design App?
7 次查看(过去 30 天)
显示 更早的评论
Hi guys,
I have a table in design app as below. I want to dispplay subscript for columnname such as qb, i had used html by code
app.UITable.ColumnName={'<html>q<sub>b','ΣRfi','Rb'}
This is worked in command window but it doesn't worked in design app.
In design app
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/651180/image.png)
In command window
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/651185/image.png)
Please help me. Thanks very much!
1 个评论
Walter Roberson
2021-6-13
That kind of use of <html> was only for uitable() with traditional figures.
采纳的回答
Adam Danz
2021-6-13
编辑:Adam Danz
2021-6-14
If you're willing to use a different subscript letter, you can use one of the available unicode subscripts (a,e,h,i,j,k,l,m,n,o,p,r,s,t). 'b' is available as a superscript but not a subscript (thanks, unicode).
Example 1 uses subscript a; example 2 uses superscript b
Example 1
data = zeros(5,3);
app.UIFigure = uifigure();
app.UITable = uitable(app.UIFigure, 'Data', data);
app.UITable.ColumnName={['q',char(8336)],'ΣRfi','Rb'};
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/651790/image.png)
Example 2
app.UITable.ColumnName={['q',char(7495)],'ΣRfi','Rb'};
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/651795/image.png)
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!