---
title: NSForm
framework: appkit
role: symbol
role_heading: Class
path: appkit/nsform
---

# NSForm

An NSForm object is a vertical matrix of NSFormCell objects to implement the fields.

## Declaration

```swift
class NSForm
```

## Topics

### Adding and Removing Entries

- [addEntry(_:)](appkit/nsform/addentry(_:).md)
- [insertEntry(_:at:)](appkit/nsform/insertentry(_:at:).md)
- [removeEntry(at:)](appkit/nsform/removeentry(at:).md)

### Changing the Appearance of All the Entries

- [setBezeled(_:)](appkit/nsform/setbezeled(_:).md)
- [setBordered(_:)](appkit/nsform/setbordered(_:).md)
- [setEntryWidth(_:)](appkit/nsform/setentrywidth(_:).md)
- [setFrameSize(_:)](appkit/nsform/setframesize(_:).md)
- [setInterlineSpacing(_:)](appkit/nsform/setinterlinespacing(_:).md)
- [setTitleAlignment(_:)](appkit/nsform/settitlealignment(_:).md)
- [setTitleBaseWritingDirection(_:)](appkit/nsform/settitlebasewritingdirection(_:).md)
- [setTextAlignment(_:)](appkit/nsform/settextalignment(_:).md)
- [setTextBaseWritingDirection(_:)](appkit/nsform/settextbasewritingdirection(_:).md)
- [setTitleFont(_:)](appkit/nsform/settitlefont(_:).md)
- [setTextFont(_:)](appkit/nsform/settextfont(_:).md)

### Getting Cells and Indices

- [indexOfCell(withTag:)](appkit/nsform/indexofcell(withtag:).md)
- [indexOfSelectedItem()](appkit/nsform/indexofselecteditem().md)
- [cell(at:)](appkit/nsform/cell(at:).md)

### Displaying a Cell

- [drawCell(at:)](appkit/nsform/drawcell(at:).md)

### Auto Layout Sizing

- [preferredTextFieldWidth()](appkit/nsform/preferredtextfieldwidth().md)
- [setPreferredTextFieldWidth(_:)](appkit/nsform/setpreferredtextfieldwidth(_:).md)

### Editing Text

- [selectText(at:)](appkit/nsform/selecttext(at:).md)

## Relationships

### Inherits From

- [NSMatrix](appkit/nsmatrix.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSAccessibilityElementProtocol](appkit/nsaccessibilityelementprotocol.md)
- [NSAccessibilityProtocol](appkit/nsaccessibilityprotocol.md)
- [NSAnimatablePropertyContainer](appkit/nsanimatablepropertycontainer.md)
- [NSAppearanceCustomization](appkit/nsappearancecustomization.md)
- [NSCoding](foundation/nscoding.md)
- [NSDraggingDestination](appkit/nsdraggingdestination.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSStandardKeyBindingResponding](appkit/nsstandardkeybindingresponding.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [NSUserActivityRestoring](appkit/nsuseractivityrestoring.md)
- [NSUserInterfaceItemIdentification](appkit/nsuserinterfaceitemidentification.md)
- [NSUserInterfaceValidations](appkit/nsuserinterfacevalidations.md)
- [NSViewToolTipOwner](appkit/nsviewtooltipowner.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Classes

- [NSOpenGLView](appkit/nsopenglview.md)
- [NSOpenGLContext](appkit/nsopenglcontext.md)
- [NSOpenGLLayer](appkit/nsopengllayer.md)
- [NSOpenGLPixelFormat](appkit/nsopenglpixelformat.md)
- [NSDrawer](appkit/nsdrawer.md)
- [NSFormCell](appkit/nsformcell.md)
- [NSMenuItemCell](appkit/nsmenuitemcell.md)
