FROM : Bertil Holmberg
DATE : Thu Jan 03 22:20:29 2008
> NSTableHeaderCells behave a bit differently than other cells.
> Normally -[NSCell highlight:withFrame:inView:] just sets the
> isHighlighted flag (and probably marks the view as needing display).
> NSTableHeaderCell, on the other hand, performs the drawing
> immediately. So -drawWithFrame:inView: is used to draw an unselected
> table header cell, and -highlight:withFrame:inView: is used to draw a
> selected table header cell.
I think this goes for other cells too. I had to use these two methods
in the drawRect method when writing a custom ListView control where I
used a TextFieldCell subclass.
Bertil
DATE : Thu Jan 03 22:20:29 2008
> NSTableHeaderCells behave a bit differently than other cells.
> Normally -[NSCell highlight:withFrame:inView:] just sets the
> isHighlighted flag (and probably marks the view as needing display).
> NSTableHeaderCell, on the other hand, performs the drawing
> immediately. So -drawWithFrame:inView: is used to draw an unselected
> table header cell, and -highlight:withFrame:inView: is used to draw a
> selected table header cell.
I think this goes for other cells too. I had to use these two methods
in the drawRect method when writing a custom ListView control where I
used a TextFieldCell subclass.
Bertil
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

