Uitable column width setting
显示 更早的评论
I have seent hat its possible for a uitable to fill the square its created in using guide.
t=handles.uitable1;
% Set width and height
t.Position(3) = t.Extent(3)
t.Position(4) = t.Extent(4)
I also see that t has the following properties:
t =
Table (uitable1) with properties:
Data: [3x5 double]
ColumnWidth: {'auto' 'auto' 'auto' 'auto'}
ColumnEditable: [0 0 0 0]
CellEditCallback: ''
Position: [0.0279 0.0418 1.0354 0.3769]
Units: 'normalized'
Is it possible to set the column widths individually, for example I wanted 1st column to be a certain size and I thought
t.ColumnWidth(1)=20
might work but it doesnt.
采纳的回答
更多回答(1 个)
Muhammad Suri
2019-3-12
app.UITable.ColumnWidth = {30,30,30,30};
类别
在 帮助中心 和 File Exchange 中查找有关 Mathematics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!