• 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
custom NSButtonCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

custom NSButtonCell


  • Subject: custom NSButtonCell
  • From: Mark Eaton <email@hidden>
  • Date: Thu, 9 Jan 2003 18:24:16 -0800

I have a subclass of NSButton for which I would like to use a custom cell class, which is a subclass of NSButtonCell. I also have a palette for my button class, and have created a window that contains one of my buttons. In my button class I have the following:

+ (void)initialize
{
[self setCellClass:[RNButtonCell class]];
}

which seemed like the logical way to do what I want (in fact this is patterned after the ProgressViewPalette sample code). However this doesn't seem to have any effect, my RNButtonCell is never instantiated when creating an RNButton.

I also added an override for +cellClass which just returns [RNButtonCell class], but again to no avail.

For now I've given up on the custom cell class and am just doing all of my work in the button itself, but if anyone can tell me what I'm doing wrong, I'd really like to do my appearance related work in the cell, which seems to be the paradigm for cocoa controls.

thanks in advance,
-mark
_______________________________________________
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.

  • Prev by Date: Re: Similar sheet questions
  • Next by Date: Listen for when apps launch
  • Previous by thread: Re: Similar sheet questions
  • Next by thread: Listen for when apps launch
  • Index(es):
    • Date
    • Thread