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
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 mails | Author | Date |
|---|---|---|
| Don Willems | Nov 25, 11:20 | |
| Michael Becker | Nov 25, 12:00 | |
| Don Willems | Nov 25, 13:32 | |
| Michael Becker | Nov 25, 15:25 | |
| Don Willems | Nov 25, 22:11 | |
| Ryan Stevens | Nov 25, 23:47 | |
| Don Willems | Nov 26, 09:15 | |
| Don Willems | Nov 26, 09:22 |






Cocoa mail archive

