Subclassing NSBox

1.1k views Asked by At

How could I subclass a NSBox to change the width, height , font type and background color of the Box's title?.

1

There are 1 answers

2
matthias On BEST ANSWER

Most of those look like they can be set with simple calls to NSBox's accessors, and the size and background color can be set by calling [myBox title] then calling the appropriate methods on the returned NSCell.

So subclassing NSBox to do all of these things would be as simple as setting the right properties in -init, and making sure to override the methods listed in the "Subclassing Notes" section within NSBox's Class Reference.