---
title: "rect(of:withFrame:in:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nspathcell/rect(of:withframe:in:)"
---

# rect(of:withFrame:in:)

Returns the current rectangle being displayed for a given path component cell, with respect to a given frame in a given view.

## Declaration

```swift
func rect(of cell: NSPathComponentCell, withFrame frame: NSRect, in view: NSView) -> NSRect
```

## Parameters

- `cell`: The path component cell.
- `frame`: The frame of the view in which the cell appears.
- `view`: The view in which the cell appears.

## Return Value

Return Value The rectangle occupied by the path component cell. NSZeroRect is returned if cell is not found or is not currently visible.

## See Also

### Managing Path Components

- [pathComponentCellClass](appkit/nspathcell/pathcomponentcellclass.md)
- [pathComponentCell(at:withFrame:in:)](appkit/nspathcell/pathcomponentcell(at:withframe:in:).md)
- [clickedPathComponentCell](appkit/nspathcell/clickedpathcomponentcell.md)
- [pathComponentCells](appkit/nspathcell/pathcomponentcells.md)
