setWidth(_:ofColumn:)
Sets the width of the specified column.
Declaration
func setWidth(_ columnWidth: CGFloat, ofColumn columnIndex: Int)Parameters
- columnWidth:
The new width of the specified column.
- columnIndex:
The index of the column for which to set the width.
Discussion
This method can be used to set the initial width of browser columns unless the column sizing is automatic; setWidth(_:ofColumn:) does nothing if columnResizingType is NSBrowser.ColumnResizingType.autoColumnResizing. To set the default width for new columns (that don’t otherwise have initial widths from defaults or via the delegate), use a columnIndex of –1. A value set for columnIndex of –1 is persistent. An columnConfigurationDidChangeNotification notification is posted (not immediately), if necessary, so that the browser can autosave the new column configuration.