# 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/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmux/pane_geometry.go#L153
- **Page:** https://libtmux.org/en/go/latest/reference/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].
