Don't highlight button's text when clicked
Don't highlight button's text when clicked
- Subject: Don't highlight button's text when clicked
- From: Gustavo Pizano <email@hidden>
- Date: Wed, 4 Nov 2009 21:21:06 +0100
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 (email@hidden)
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:
This email sent to email@hidden