Keep uitable's column width after setting its data property
9 次查看(过去 30 天)
显示 更早的评论
Hi, I have a following issue and hope that someone can help me. Like in the embedded gif:
1. Since i cant see all the variable names, I change the column width
2. Resizing the table would not alter the column width again
3. BUT(!) if I set the table data with another content and change its data property, then the column width go back to its original values. And this is really annoying.
Can someone help to solve this? I assume this must use some java technics.
0 个评论
回答(1 个)
Jens-Christian Meiners
2018-7-16
Based on the behavior you describe, I guess that the ColumnWidth property for the column in question of your uitable is set to 'auto'. Setting it initially to a fixed number still allows you to resize the column, but should stop the automatic resizing based on data content.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!