---
title: "setContentBorderThickness(_:for:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nswindow/setcontentborderthickness(_:for:)"
---

# setContentBorderThickness(_:for:)

Specifies the thickness of a given border of the window.

## Declaration

```swift
func setContentBorderThickness(_ thickness: CGFloat, for edge: NSRectEdge)
```

## Parameters

- `thickness`: The thickness for edge, in points.
- `edge`: The border whose thickness to set: NSMaxYEdge: Top border. NSMinYEdge: Bottom border.

## Discussion

Discussion In a nontextured window calling setContentBorderThickness:forEdge: passing NSMaxYEdge will raise an exception (in a nontextured window, it’s only valid to set the content border thickness of the bottom edge). It is only valid to set the content border thickness of the top edge in a textured window. Typically, if you call setContentBorderThickness:forEdge:, you should also call setAutorecalculatesContentBorderThickness:NO forEdge:. The contentBorder does not include the title bar or toolbar, so a textured window that just wants the gradient in the title bar and toolbar should have a thickness of 0 for NSMaxYEdge.

## See Also

### Configuring the Window’s Appearance

- [styleMask](appkit/nswindow/stylemask-swift.property.md)
- [NSWindow.StyleMask](appkit/nswindow/stylemask-swift.struct.md)
- [toggleFullScreen(_:)](appkit/nswindow/togglefullscreen(_:).md)
- [worksWhenModal](appkit/nswindow/workswhenmodal.md)
- [alphaValue](appkit/nswindow/alphavalue.md)
- [backgroundColor](appkit/nswindow/backgroundcolor.md)
- [colorSpace](appkit/nswindow/colorspace.md)
- [setDynamicDepthLimit(_:)](appkit/nswindow/setdynamicdepthlimit(_:).md)
- [canHide](appkit/nswindow/canhide.md)
- [isOnActiveSpace](appkit/nswindow/isonactivespace.md)
- [hidesOnDeactivate](appkit/nswindow/hidesondeactivate.md)
- [collectionBehavior](appkit/nswindow/collectionbehavior-swift.property.md)
- [isOpaque](appkit/nswindow/isopaque.md)
- [hasShadow](appkit/nswindow/hasshadow.md)
- [invalidateShadow()](appkit/nswindow/invalidateshadow().md)
