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.
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.
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.
Note that the border appears inside the box and can reduce the amount of space available to the content rectangle.
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-02-15