Anyone have a fix?: How to make NSButton not invert (gray) when tracking mouse?
Anyone have a fix?: How to make NSButton not invert (gray) when tracking mouse?
- Subject: Anyone have a fix?: How to make NSButton not invert (gray) when tracking mouse?
- From: tyler <email@hidden>
- Date: Tue, 7 Aug 2001 13:24:32 -0700
RE: How to make NSButton not invert (gray) content area of button when
tracking mouse?
I'm still trying to find an answer for this. Anyone?
thanks!
tyler
On Monday, August 6, 2001, at 08:59 PM, tyler wrote:
Hey there,
I have and NSButton and it has a main and alternate image and is set
up to be a Toggle type button. Click it and it's one picture, click
again and it's the other. That all works great and I like it.
What I want it to do is switch to the other picture while the mouse is
being tracked in the button (switching back and forth as you move the
mouse in/out of the button rect). I have this working
[[mybtn cell] setHighlightsBy: NSContentsCellMask]; for those who
haven't seen this.
However, the effect is ruined by the "selecting" of the button
rectangle that also happens. Looks like it's making the picture darker
(gray). Is there a way to turn off this part of the tracking so the
only tracking is my two images going back and forth?
I tried things like:
[[mainSwitch cell] setCellAttribute: NSCellLightsByContents to:
1]; // or YES
[[mainSwitch cell] setCellAttribute: NSChangeGrayCell to: 0]; //
or NO
[[mainSwitch cell] setCellAttribute: NSCellLightsByGray to:
0]; // or NO
with no luck. Always it's darkening the images (and switching them
like I want, just want to get rid of that darkening of the image during
tracking).
Any ideas on how to get this to work?
Thanks in advance for any tips/tricks you might be able to offer!
tyler
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev