---
title: "selectionManager(_:locationOfTextContainerAt:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextselectionmanager/delegate-swift.protocol/selectionmanager(_:locationoftextcontainerat:)"
---

# selectionManager(_:locationOfTextContainerAt:)

Returns the text location of the text container at the specified point.

## Declaration

```swift
optional func selectionManager(_ selectionManager: NSTextSelectionManager, locationOfTextContainerAt point: NSPoint) -> (any NSTextLocation)?
```

## Parameters

- `selectionManager`: The selection manager requesting the text location.
- `point`: The point in the view’s coordinate system.

## Return Value

Return Value The text location for the text container at the point, or nil if no container exists there.

## Discussion

Discussion Implement this method to support layouts with multiple text containers, such as multi-column or paginated layouts. For full multiple-text-container support, also implement selectionManager:frameOfTextContainerAtPoint:.
