Decreasing the size of a row in a uitable

2 次查看(过去 30 天)
I have a column of row names in a uitable, however one of the row names is quite long and the uitable automatically centralises the row name and puts a large gap either side of it. This means the data in the next column can't be fully displayed without a scroll bar, which makes it more difficult to interpret quickly. How do I decrease the size of the width of the column containing row names?
Thank you in advance for your help.

回答(1 个)

Benjamin Thompson
Looks like you can just change the ColumnName property directly:
>> uit.ColumnName
ans =
6×1 cell array
{'Last Name' }
{'Age' }
{'Weight' }
{'Height' }
{'Smoker' }
{'Health Status'}
>> uit.ColumnName{6} = 'Health';
>> uit.ColumnName
ans =
6×1 cell array
{'Last Name'}
{'Age' }
{'Weight' }
{'Height' }
{'Smoker' }
{'Health' }

类别

Help CenterFile 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!

Translated by