uitable: text-alignment with HTML
8 ビュー (過去 30 日間)
古いコメントを表示
Hello everybody!
To customize uitbales in Matlab I used the solution posted in:
which works perfectly.
Additionally, I would like to align each cell content (strings) to the center of the cell. To do so I tried changing:
colText('Blue text', 'blue'), ...
to
colText('<HTML><p style="text-align:center">Blue text</p></HTML>', 'blue')
But it does not show any effect.
Can you tell me how it is possible to change the text alignment in the cells using the suggested code snippet from the posted link and maybe give an example?
Thank you very much in advance!
0 件のコメント
回答 (2 件)
Walter Roberson
2014 年 3 月 26 日
編集済み: Walter Roberson
2023 年 1 月 19 日
style attributes and css are newer than the HTML that is supported. Use the HTML CENTER tag instead.
2 件のコメント
Walter Roberson
2023 年 1 月 19 日
Note: in the time since this question was originally asked, uifigure() were added. uitable() that exist within uifigure() have additional formatting possibilities
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!