Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Setting a Box’s Border Appearance

The appearance of an NSBox is set using a combination of the methods setBoxType: and setBorderType:. By default an NSBox instance is set to use the NSBoxPrimary box type and the NSGrooveBorder border type.

The appearance in Figure 1 is achieved by calling the method setBorderType: and specifying NSNoBorder as the box type.


Figure 1  NSBox with no visible border

NSBox with no visible border

The appearance in Figure 2 is achieved by calling the method setBorderType: and specifying NSGrooveBorder as the border type, and calling setBoxType: and specifying NSBoxPrimary as the box type.


Figure 2  NSBox displaying primary appearance

NSBox displaying primary appearance

The appearance in Figure 3 is achieved by calling the method setBorderType: and specifying NSGrooveBorder as the border type, and calling setBoxType: and specifying NSBoxSecondary as the box type.


Figure 3  NSBox displaying secondary appearance

NSBox displaying secondary appearance

Note that the border appears inside the box and can reduce the amount of space available to the content rectangle.



< Previous PageNext Page > Hide TOC


Last updated: 2003-02-15




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice