---
title: "setValue(_:type:for:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextblock/setvalue(_:type:for:)"
---

# setValue(_:type:for:)

Sets a dimension of the text block.

## Declaration

```swift
func setValue(_ value: CGFloat, type: NSTextBlock.ValueType, for dimension: NSTextBlock.Dimension)
```

## Parameters

- `type`: The type of value being provided. This controls how val is interpreted.
- `dimension`: The dimension to set.

## See Also

### Working with dimensions of content

- [value(for:)](appkit/nstextblock/value(for:).md)
- [valueType(for:)](appkit/nstextblock/valuetype(for:).md)
- [setContentWidth(_:type:)](appkit/nstextblock/setcontentwidth(_:type:).md)
- [contentWidth](appkit/nstextblock/contentwidth.md)
- [contentWidthValueType](appkit/nstextblock/contentwidthvaluetype.md)
- [NSTextBlock.Dimension](appkit/nstextblock/dimension.md)
- [NSTextBlock.ValueType](appkit/nstextblock/valuetype.md)
