NSTableViewMBS.style

According to the docs the style for NSTableViewMBS has different values. However, they don’t work correctly. I’m using the example “Simple demo with datasource”.

Inset

Code:

// Let's preset the columns to automatic resizing - can be overwritten by code in Open() event or later, or disabled by setting ColumnWidths to a non-empty string.
mDefaultColumnAutoresizingStyle = NSTableViewMBS.NSTableViewUniformColumnAutoresizingStyle
mTableView.style = NSTableViewMBS.NSTableViewStyleInset

Result:

Source list

Code:

// Let's preset the columns to automatic resizing - can be overwritten by code in Open() event or later, or disabled by setting ColumnWidths to a non-empty string.
mDefaultColumnAutoresizingStyle = NSTableViewMBS.NSTableViewUniformColumnAutoresizingStyle
mTableView.style = NSTableViewMBS.NSTableViewStyleSourceList

Result:

Bug?

macOS Ventura, MBS 22.5

Do you set columnAutoresizingStyle property with the mDefaultColumnAutoresizingStyle value later?

The source list thing seems to work as you see the selection changes.

Yes, that’s in the original code:

// Let's preset the columns to automatic resizing - can be overwritten by code in Open() event or later, or disabled by setting ColumnWidths to a non-empty string.
mTableView.style = NSTableViewMBS.NSTableViewStyleInset
mDefaultColumnAutoresizingStyle = NSTableViewMBS.NSTableViewUniformColumnAutoresizingStyle
mTableView.columnAutoresizingStyle = mDefaultColumnAutoresizingStyle

The source list is inset at the left side but not at the right side. But I mainly need the style NSTableViewStyleInset.

@Christian_Schmitz : any idea?

The style works fine, by the way, for the OutlineControl demo.