horizontally scrolling table


James Walker
 

I have a view-based NSOutlineTable with a single column containing static text.  How do I make the column resize appropriately so that the table will scroll horizontally, rather than truncating the text?


Quincey Morris
 

On Mar 9, 2018, at 10:52 , James Walker <list2@jwwalker.com> wrote:

I have a view-based NSOutlineTable with a single column containing static text. How do I make the column resize appropriately so that the table will scroll horizontally, rather than truncating the text?
I think there are two issues:

1. There is no automatic way to do this. You would need to compute the desired column width, then compute the desired outline view width, and resize the outline view. (The column can be made to resize automatically within the outline view.)

2. It’s a slight abuse of a columnar view, where the point of a column is to provide a reasonable amount of space for all its rows, and fitting all columns into a reasonable width, usually the visible width. But only a very slight abuse.