How to adjust uitable() Column width depending on the amount of columns
11 ビュー (過去 30 日間)
古いコメントを表示
Arne T
2021 年 1 月 19 日
回答済み: Sahithi Kanumarlapudi
2021 年 1 月 27 日
Hi all,
I have a UiTable where different data can be shown. In every case the data is a single number and the VariableNames are much longer.
Now I want a function, which sets the column width to 30px, but only if there are enough columns that the table wouldt be to small for the size. I add an Image showing what dont have to happen.
I had following idea:
if app.table.Position(3) > size(app.Table.Data,2)*30 % Position 3 contains information about the table width, the left side of the comparisonis the size of all columns together
app.table.ColumnWidth = 'auto';
else
app.table.ColumnWidth = num2cell(ones(1,size(app.Table.Data,2))*30);
end
But the width of the RowNames Column isnt considered. I did not find a Property containing this Information. So this Solution doesnt work.
Does anybody know a solution for my problem or where to find the width of the RowNames Column?
Thank you very much!
0 件のコメント
採用された回答
Sahithi Kanumarlapudi
2021 年 1 月 27 日
Hi,
As of now, the width of RowNames column property cannot be customized. I have heard that this issue is known and the concerned parties may be investigating further. This may be enhanced in future releases.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Whos についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!