Re: NSButton behavior
Re: NSButton behavior
- Subject: Re: NSButton behavior
- From: Herr Witten <email@hidden>
- Date: Sun, 20 Jun 2004 21:53:13 -0400
Thanks for the reply, but the problem still persists.
I think it has to do with the pulse drawing. The other bezel options
don't freeze it.
On 20 Jun 2004, at 15:43, Stiphane Sudre wrote:
>
I hope you won't bang your head against the wall after reading this:
I did that before I read it.
>
>
Instead of calling [ sizeToFit] before [ setBezelStyle:
>
NSRoundedBezelStyle], just call it after.
Actually, that what I've been doing. Here is the code with your
additions,:
NSButton* button = [[NSButton alloc] initWithFrame: NSZeroRect];
[button setBezelStyle: NSRoundedBezelStyle];
[button setKeyEquivalent: @"\r"];
[button setTitle: NSLocalizedString(@"Cancel", @"")];
[button setTarget: self];
[button setAction: @selector(cancelSheet:)];
[button sizeToFit];
>
* Use initWithFrame instead of init
I don't have any particular frame, so is not init the same as above?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.