Skip navigation.
 
mlbackground of NSButton and NSPopUpButton
FROM : Don Willems
DATE : Thu Nov 25 11:20:46 2004

Hi,

I would like to change the background of an NSButton and NSPopUpButton
and I'm wonderin how to do this. I can imagine several ways of doing
this, but don't know what the best way is.
The controls should look like the buttons and popupbuttons in the 'bar'
above the scrollpane in XCode's editor.
I've never tried this before and maybe there is a simple solution which
I don't see.

The first solution I thought of was:
- use an NSView subclass (with custom background) as the superview of
the NSButtons and NSPopUpButtons which have no border.

But this solution is not very generic.
Now I'm thinking of subclassing NSButtonCell and NSPopUpButtonCell, but
I'm not sure how to go about that.

What do you think,

Don

Related mailsAuthorDate
mlbackground of NSButton and NSPopUpButton Don Willems Nov 25, 11:20
mlRe: background of NSButton and NSPopUpButton Michael Becker Nov 25, 12:00
mlRe: background of NSButton and NSPopUpButton Don Willems Nov 25, 13:32
mlRe: background of NSButton and NSPopUpButton Michael Becker Nov 25, 15:25
mlRe: background of NSButton and NSPopUpButton Don Willems Nov 25, 22:11
mlRe: background of NSButton and NSPopUpButton Ryan Stevens Nov 25, 23:47
mlRe: background of NSButton and NSPopUpButton Don Willems Nov 26, 09:15
mlRe: background of NSButton and NSPopUpButton Don Willems Nov 26, 09:22