views:

132

answers:

1

I am using BGHUDAppKit for an outline view within a HUD-style (black) NSPanel. As such the text in my outline view cells is light gray or white. Unfortunately this means that when I hover to bring up a tooltip for a cell's value, it shows up as light gray text on yellow, which is illegible.

How can I set the text color for the tooltip, or is there a way that I can modify the control itself (without changing its appearance) to work better with the tooltip mechanism?

+2  A: 

You can override - (void)drawWithExpansionFrame:(NSRect)cellFrame inView:(NSView *)view in a NSCell subclass to draw whatever you want in the (tool tip) expansion frame.

Nicholas Riley
My solution ended up being to swap out the text color (store the original in a local variable) and rely on the existing drawWithExpansionFrame:inView: code, then reinstate the original color afterward.
Adam Preble
Cool - glad you got it figured out.
Nicholas Riley