How to Expand NSTableCellView Width When Resizing Column in NSTableView

匆匆过客 提交于 2020-01-29 04:46:44

问题


I am trying to display a path in my table view. Both columns of the table view on the left side are the same for testing/demonstration purposes. Notice how the leftmost path is truncated:

When I expand the column, the (truncated) table view cell doesn't expand with the column:

My question is how would I go about resizing the cell when I resize the table view column?


回答1:


Found a solution, what you want to do is add a few constraints

Step 1: go to the table cell view for said column

Step 2: Change these constraints

Step 3: Change these constraints aswell

Step 4: run your app and look at your nice table :-D



来源:https://stackoverflow.com/questions/25505903/how-to-expand-nstablecellview-width-when-resizing-column-in-nstableview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!