Subclassing NSButton?
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.