How to change the width of rowname label in AppDesigner UITable
9 次查看(过去 30 天)
显示 更早的评论
Hi,
I am working on an AppDesigner app containing an UITable. The UITable is updated with new data and new rownames a couple of times.
If I set the rowlabels via app.UITable.RowName = {'Long row name 1', 'Long row name 2', 'Long row name 1'} the width of the row name label resizes so that it fits the length of the row name.
When I set new rownames that are much shorter, the width of the rowname label still remains the same size, much too wide.
How can I reset the row name label width so that it also resizes to shorter rownames?
I already searched the forum, but could not find a solution. One could use findjobj() to control the width of the rowname label, but that does not work for Appdesiner figures, because they are not Java based.
Thanks in advance!
0 个评论
回答(1 个)
Rahul
2025-4-16
There is no known workaround for adjusting the width of the rowname label. It adjusts its size based on the text along with some padding for shorter texts. I agree that using 'findjobj' could not be possible since App Designer components are not Java based.
A possible workaround could be to add the rowname labels in a separate column instead and adjust its width using 'ColumnWidth' property of the 'uitable'. Tis is also mentioned in this MATLAB Answer:
The following MathWorks documentations can be referred to know more:
Thanks.
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!