• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSButton behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: NSButton behavior [weirder]
      • From: Herr Witten <email@hidden>
References: 
 >Re: NSButton behavior (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: Re: Debugger calling string methods on a window
  • Next by Date: Re: Checking For Keys
  • Previous by thread: Re: NSButton behavior
  • Next by thread: Re: NSButton behavior [weirder]
  • Index(es):
    • Date
    • Thread