Re: Trouble with NSTableViews in macOS 11.x


Sak Wathanasin
 



On 26 Mar 2021, at 22:46, Jon Gotow <gotow@...> wrote:

I ran into this when updating all of my apps for Big Sur. You'd think the "Full Width" style would make the table, well, full width, but it doesn't. I think the solution was to set the tableview style to "Plain". 

Both "plain" and "fullwidth" sort of work; my mistake was using IB to set this property and it had no effect. When I set it in code (thanks, Shane!), I could see differences in behaviour. Both styles result in the gridlines being drawn from edge to edge. However,

1) with "fullwidth"
- the table is still indented (6 or 16 px as before)
- if the enclosing scrollview has borders, gridlines are drawn for empty rows
- if the scrollview has no borders, gridlines are not drawn for empty rows

2) with "plain"
- the table is no longer indented
- gridlines are not drawn for empty rows whether the scrollview has borders or not

We want gridlines on empty rows, but our tables are also borderless as the designers wanted the border around the table name label as well. Bascially, we want the 10.15 behaviour back. That it behaves differently depending on whether the enclosing scrollview is bordered or not doesn't feel right.

I guess it's worth raising a bug report with Apple and seeing what comes of it.

Thanks to everyone
Sak

Join cocoa@apple-dev.groups.io to automatically receive all group messages.