• 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
Subclassing NSButton?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Subclassing NSButton?


  • Subject: Subclassing NSButton?
  • From: Andrew Merenbach <email@hidden>
  • Date: Sun, 28 Jul 2002 20:15:09 -0700

I'm working on a periodic table of the elements in a chemistry program I am making, and would like to have buttons of different colors to represent the various elements. I would like to subclass NSButton to do a few things:

1. Change the default background color of various small square buttons, or even better, just the tint, so I can retain an Aqua appearance throughout my prorgam.

2. Change the text color of the buttons, as well.

3. Tell the button to display the alternate title in smaller type above the main title, so I can display the atomic number of an element in addition to its symbol.

Looking back over these three things, my first thought is that I'm completely subverting the Aqua interface, which I probably am. My goal is to create a new sort of control, however, so I won't need to make 109 images, one for each element, to use as backgrounds for my buttons.

Is what I suggest at all feasible, or is there a better way to do things?

Take care,
Andrew Merenbach
_______________________________________________
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: NSUserDefaults, an array, and SIGBUS 10
  • Next by Date: ask about sleep function
  • Previous by thread: Re: NSUserDefaults, an array, and SIGBUS 10
  • Next by thread: ask about sleep function
  • Index(es):
    • Date
    • Thread