# tmux.Pane.SetWidth

- **Module:** tmux.Pane
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/pane_geometry.go#L153
- **Page:** https://libtmux.org/reference/go/tmux-pane-setwidth/

```
tmux.Pane.SetWidth(ctx: context.Context, width: int) -> (Pane, error)
```

SetWidth resizes the pane to a nonnegative absolute width in cells. Zero is an explicit width. Targeting, refresh, and error semantics match [Pane.Resize].
