<!--
{
  "availability" : [
    "macOS: 10.12.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextField/init(labelWithString:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextField(cm)labelWithString:"
  },
  "title" : "init(labelWithString:)"
}
-->

# init(labelWithString:)

Initializes a text field for use as a static label that uses the system default font, doesn’t wrap, and doesn’t have selectable text.

```
convenience init(labelWithString stringValue: String)
```

## Parameters

`stringValue`

A string to use as the content of the label.

## Return Value

A text field that displays the specified string as a static label.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)