Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Attributed titles for buttons



I'm in the process of reworking a periodic table of the elements in a program of mine, and have wondered as to the soundness of my drawing method.

I currently override drawInteriorWithFrame: to fill in a colored background and call custom methods to size, position, and place the title (which I use for the elemental symbol) and alternateTitle (which I use for the atomic number) at different positions within the button cell.

I've begun to experiment, however, with the concept of using an attributed string for the title, which would allow me to remove my positioning methods. Would the creation and manipulation of an NSMutableAttributedString be slower than actually drawing the string myself?

Take care,
Andrew
_______________________________________________
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.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.