问题
My NSTableView has variable height rows. The rows correctly resize after an edit of a cell has been completed, and during/after resizing the column/table. The Row also correctly resizes while a user is typing into the text cell.
However, the cell itself does NOT resize during editing to match the height of the row. Does anyone have any ideas on this? In this screenshot one end-edit has occurred already (which is why the text area is larger than 1 line) but there is currently enough text in the cell to account for about 5 lines, thus the height of the row is not matching what should be displayed.
回答1:
Both the textview and the cell have to have their autoresize set if you want them to automatically scale.
It looks like the cells in the Tag Name
column are properly set to resize but that either the cell or the textview in the value
column has not been. Check the sittings in Interface Builder.
来源:https://stackoverflow.com/questions/7301996/nscell-size-not-increasing-with-row-height-during-text-edit