Contents

highlight(_:withFrame:in:)

Redraws the receiver with the specified highlight setting.

Declaration

func highlight(_ flag: Bool, withFrame cellFrame: NSRect, in controlView: NSView)

Parameters

  • flag:

    If True, the cell is redrawn with a highlight; otherwise, if False, the highlight is removed.

  • cellFrame:

    The bounding rectangle of the receiver.

  • controlView:

    The control that manages the cell.

Discussion

Note that the NSCell highlighting does not appear when highlighted cells are printed (although instances of NSTextFieldCell, NSButtonCell, and others can print themselves highlighted). Generally, you cannot depend on highlighting being printed because implementations of this method may choose (or not choose) to use transparency.

See Also

Drawing and Highlighting