A Text Field Cell for Totals

Someone asked me how to add visual elements to a text field. This someone had several ideas that were “creative” but bat-shit nuts.

I’m always hesitant to “give a man a fish” but figured the example I was thinking of was not only a good lesson to Cocoa newbies but a useful bit of code for others to use. It’s a text field cell subclass that draws “total bars” top and/or bottom in several styles and in any color.

The total bar cell can be used in a table, or in a label, in a house, or with a mouse. You can use it free of charge, I’d just like credit, by and large. See the license before you use it, or my friend, I just may lose it …

Have Fun!

The source is available here.