Sorry my mistake, as always.. its being fixed,

I was setting the glossy on the cells frame and not the background color.

I need then to pass a backgroundcolor with an alpha and thats it.


thanks thou.

G
On Nov 4, 2009, at 9:21 PM, Gustavo Pizano wrote:

Hello.

I have a custom NSButtonCell, also my CustomButton, I draw a glossy BackGround in the ButtonCell, and set the text to white-bold color.
now I overrode the method:

- (void)highlight:(BOOL)flag withFrame:(NSRect)cellFrame inView: (NSView *)controlView{ so set but a little darker glossy background color, but then I see that the text stays behind the new color im applying.

I did some research, and found the method setHighlightsBy of NSButtonCell, so in the initialization of my custom button cell, I did:

[self setHighlightsBy:NSChangeBackgroundCellMask| NSChangeGrayCellMask];

but nothing happened, still the text its behind the new color.
then I tried applying the text-color with an attributedstring as I did in the - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *) controlView to change the text color, but then nothing happens, not even the new color its applied ...

Any ideas?

Thanks


Gustavo

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to