<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSBrowserDelegate/browser(_:shouldSizeColumn:forUserResize:toWidth:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSBrowserDelegate(im)browser:shouldSizeColumn:forUserResize:toWidth:"
  },
  "title" : "browser(_:shouldSizeColumn:forUserResize:toWidth:)"
}
-->

# browser(_:shouldSizeColumn:forUserResize:toWidth:)

Used to determine a column’s initial size.

```
@MainActor optional func browser(_ browser: NSBrowser, shouldSizeColumn columnIndex: Int, forUserResize: Bool, toWidth suggestedWidth: CGFloat) -> CGFloat
```

## Parameters

`browser`

The browser.

`columnIndex`

The index of the column to size.

`forUserResize`

Currently, this is always set to <doc://com.apple.documentation/documentation/Swift/false>.

`suggestedWidth`

The suggested width for the column.

## Return Value

The delegate’s desired initial width for a newly added column. If you want to accept the suggested width, return `suggestedWidth`. If you return `0` or a size too small to display the resize handle and a portion of the column, the actual size used will be larger than the size you requested.

## Discussion

This method applies only to browsers with resize type [`NSBrowser.ColumnResizingType.noColumnResizing`](/documentation/AppKit/NSBrowser/ColumnResizingType-swift.enum/noColumnResizing) or [`NSBrowser.ColumnResizingType.userColumnResizing`](/documentation/AppKit/NSBrowser/ColumnResizingType-swift.enum/userColumnResizing) (see [`NSBrowser.ColumnResizingType`](/documentation/AppKit/NSBrowser/ColumnResizingType-swift.enum)).

## See Also

[`-  setWidth:ofColumn:`](/documentation/AppKit/NSBrowser/setWidth(_:ofColumn:))

Sets the width of the specified column.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)