开发者

Subclassing NSBox

How could I subclass a NSBox to change the width, height , font type and background co开发者_JAVA百科lor of the Box's title?.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜