I have a single column NSTableView
(view based) with a TextField
. I am using autolayout and IB. Most of the views in the window are resizable, in particular the table. I am putting attributed text in the TextField. If the application starts with the table width smaller or equal to the width of the TextField (as specified in IB), then everything works great. On the other hand, if the table is initially presented too wide, then the TextField is too small and the text wraps leaving a large amount of left hand space. Resizing the table automatically corrects the TextField width, until the application is restarted.
Inside tableView viewForTableColumn I get an NSTableCellView with the standard makeViewWithIdentifier. I tried forcing the frame size larger, but that had no effect. The frame matches the values from the nib (as one would expect). The only constraints are on the Table Cell View, which force it to grow and shrink with the table resizing, BUT only after the table width is shrunk by the user.
Is there something going on with the Bordered Scroll View that holds the table? Where would I force the NSTableCellView to reconcile its width?
before manual resize by user:
after resizing:
Thanks...