I have a borderless NSButton
(more or less a NSTextField
with an action) that I would like to behave like an "image-based" button, i.e. I would like the button text to change color when passed over with a mouse and when clicked. Is there an easy way to achieve that ?
Here is my button initialization context :
NSButton* but =[[NSButton alloc] initWithFrame:NSMakeRect(5, 5, 125, 25)] ;
[but setTitle:@"Do not show Again"];
[but setButtonType:NSMomentaryLightButton]; //I figure it could be here
[but setBezelStyle:NSHelpButtonBezelStyle];
[but setBordered:NO];
[but setAction:@selector(writeToUserDefaults)];
[but setFont:[NSFont fontWithName:@"Arial" size:9.0]];
[self.view addSubview:but];
Source that didn't work : Borderless NSButton Turns Gray
What are my solution (besides subclassing NSButton ?)