---
title: shouldInvalidateLayoutForHighlightChange
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsscrubberlayout/shouldinvalidatelayoutforhighlightchange
---

# shouldInvalidateLayoutForHighlightChange

Determines whether the scrubber should refresh its layout when an item is highlighted.

## Declaration

```swift
var shouldInvalidateLayoutForHighlightChange: Bool { get }
```

## Discussion

Discussion If true, the scrubber invalidates its layout when an item is highlighted. Subclasses should return true if the highlight state affects the item layout. The base implementation of this method returns false.

## See Also

### Subclassing a scrubber layout

- [prepare()](appkit/nsscrubberlayout/prepare().md)
- [scrubberContentSize](appkit/nsscrubberlayout/scrubbercontentsize.md)
- [layoutAttributesForItem(at:)](appkit/nsscrubberlayout/layoutattributesforitem(at:).md)
- [layoutAttributesForItems(in:)](appkit/nsscrubberlayout/layoutattributesforitems(in:).md)
- [shouldInvalidateLayoutForSelectionChange](appkit/nsscrubberlayout/shouldinvalidatelayoutforselectionchange.md)
- [shouldInvalidateLayoutForChange(fromVisibleRect:toVisibleRect:)](appkit/nsscrubberlayout/shouldinvalidatelayoutforchange(fromvisiblerect:tovisiblerect:).md)
- [automaticallyMirrorsInRightToLeftLayout](appkit/nsscrubberlayout/automaticallymirrorsinrighttoleftlayout.md)
