views:

269

answers:

1

I have most of the code that works

[self.disclosureButton setBezelStyle:NSDisclosureBezelStyle];
[self.disclosureButton setButtonType: NSPushOnPushOffButton];
[self.disclosureButton setTitle:nil];
[self.disclosureButton highlight:NO];

However, when I press the button, it turns black to indicate the press. How do I get it to stop changing colors?

+1  A: 

The behavior you are seeing sounds correct for a Cocoa disclosure triangle, so I would say your code is successful.

Chuck
I am making one myself because I have a custom class that subclasses the nsview. It does custom back ground drawings and a whole bunch of stuff. I do this because I use this type of view in a bunch of places and I want to make the code portable and not have to drag the items out everytime I use this type of view.If you use the triangles in IB, they dont have that blink to them. I like the look of it more.
joels