# NSBox

scottc@net-community.com
Generated at 2026-06-27 19:09:52 +0000

Simple box view that can display a border and title

1996-2024 Free Software Foundation, Inc.
Software documentation for the NSBox class
AppKit/NSBox.h
NSCoding

TODO : Description

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
borderColor
Description forthcoming.
borderRect

Returns the border rectangle of the box.

borderType

Returns the NSBox's border type. See NSBorderType for more information. The default border type is NSGrooveBorder .

See Also: -setBorderType:

borderWidth
Description forthcoming.
boxType
Description forthcoming.
contentView

Returns the NSBox's content view. The content view is created as NSView when the box is initialized. The contentView is resizes when needed.

See Also: -setContentView:

contentViewMargins

Returns an NSSize containing the interior margins of the receiver. An NSBox's content view margins are empty space that is subtracted from the top, bottom, and sides as padding between the inside of the box and the frame of its content view.

See Also: -setContentViewMargins:

cornerRadius
Description forthcoming.
fillColor
Description forthcoming.
isTransparent
Description forthcoming.
minimumSize
Description forthcoming.
setBorderColor:
newBorderColor
Description forthcoming.
setBorderType:
aType

Sets the border type to aType, resizes the content view frame if needed, and marks self for display. See NSBorderType for more informations The default boder type is NSGrooveBorder .

See Also: -borderType

setBorderWidth:
borderWidth
Description forthcoming.
setBoxType:
aType
Description forthcoming.
setContentView:
aView

Sets the content view to aView. The current content view is replaced by -replaceSubview:with: . So you should -retain the current view if you want to use it later. The contentView frame is resized if needed.

See Also: -contentView

setContentViewMargins:
offsetSize

Sets the NSSize containing the interior margins to offsetSize. An NSBox's content view margins are empty space that is subtracted from the top, bottom, and sides as padding between the inside of the box and the frame of its content view

See Also: -contentViewMargins

setCornerRadius:
cornerRadius
Description forthcoming.
setFillColor:
newFillColor
Description forthcoming.
setFrameFromContentFrame:
contentFrame

Resizes the NSBox to fit the content view frame contentFrame.

setTitle:
aString

Sets the title cell to aString, resizes the content view frame if needed and marks self for display.

Warning: This method does not implement the Cocoa behaviour

See Also: -title [NSCell -setStringValue:]

setTitleFont:
fontObj

Sets the title cell font to fontObj, resizes the content view frame if needed and marks self for display.

See Also: -titleFont [NSCell -setFont:]

setTitlePosition:
aPosition

Sets the title cell position to aPosition , resizes the content view frame if needed and marks self for display. See NSTitlePosition for more information. The default position is NSAtTop .

See Also: -titlePosition

setTitleWithMnemonic:
aString
Description forthcoming.
setTransparent:
transparent
Description forthcoming.
sizeToFit

Resizes the NSBox and its content view to fit its subviews.

title

Returns title cell string value.

See Also: -setTitle: [NSCell -stringValue]

titleCell

Returns the title cell

titleFont

Returns the title cell font.

See Also: -setTitleFont: [NSCell -font]

titlePosition

Returns the title position. See NSTitlePosition for more information. The default position is NSAtTop

See Also: -setTitlePosition:

titleRect

Returns the title rectangle