Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSBoxMBS class.
NSBoxMBS.borderColor as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The receiver's border color. It must be a custom box—that is, it has a type of NSBoxCustom—and it must have a border style of NSLineBorder.
Available in Mac OS X v10.5 and later.
(Read and Write computed property)
NSBoxMBS.borderRect as NSRectMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The rectangle in which the border of the NSBox is drawn.
NSBoxMBS.borderType as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
A constant describing the type of border. Border types are defined in NSView.h. Currently, the following border types are defined: NSNoBorder, NSLineBorder, NSBezelBorder, NSGrooveBorder.
If the size of the new border is different from that of the old border, the content view is resized to absorb the difference, and the box is marked for redisplay.
(Read and Write computed property)
NSBoxMBS.borderWidth as Double
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Functional only when the receiver's box type (boxType) is NSBoxCustom and its border type (borderType) is NSLineBorder.
Available in Mac OS X v10.5 and later.
(Read and Write computed property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Use the NSBox* constants.
(Read and Write computed property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
On success the handle property is not zero.
See also:
NSBoxMBS.Constructor(Handle as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The handle is casted to a NSBox and the plugin retains this handle.
See also:
NSBoxMBS.Constructor(left as Double, top as Double, width as Double, height as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
On success the handle property is not zero.
See also:
NSBoxMBS.contentView as NSViewMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
On settings the NSView object is resized to fit within the box's current content area and the box is marked for redisplay.
(Read and Write computed property)
NSBoxMBS.contentViewMargins as NSSizeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Value: The width and height of the offset between the box's border and content view. The horizontal value is applied (reckoned in the box's coordinate system) fully and equally to the left and right sides of the box. The vertical value is similarly applied to the top and bottom.
Unlike changing a box's other attributes, such as its title position or border type, changing the offsets doesn't automatically resize the content view. In general, you should send a sizeToFit message to the box after changing the size of its offsets. This message causes the content view to remain unchanged while the box is sized to fit around it.
(Read and Write computed property)
NSBoxMBS.cornerRadius as Double
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Functional only when the receiver's box type (boxType) is NSBoxCustom and its border type (borderType) is NSLineBorder.
(Read and Write computed property)
NSBoxMBS.fillColor as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The receiver's fill color. It must be a custom box—that is, it has a type of NSBoxCustom—and it must have a border style of NSLineBorder.
Available in Mac OS X v10.5 and later.
(Read and Write computed property)
NSBoxMBS.setFrameFromContentFrame(contentFrame as NSRectMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
contentFrame: The rectangle specifying the frame of the box's content view, reckoned in the coordinate system of the box's superview. The box is marked for redisplay.
NSBoxMBS.setTitleWithMnemonic(stringWithAmpersand as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Mnemonics are not supported in Mac OS X.
By default, a box's title is "Title." The content view is not automatically resized, and the box is not marked for redisplay.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The receiver is then moved and resized to wrap around the content view. The receiver's width is constrained so its title will be fully displayed.
You should invoke this method after:
- Adding a subview (to the content view)
- Altering the size or location of such a subview
- Setting the margins around the content view
The mechanism by which the content view is moved and resized depends on whether the object responds to its own sizeToFit message: If it does respond, then that message is sent, and the content view is expected to be so modified. If the content view doesn't respond, the box moves and resizes the content view itself.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
By default, a box's title is "Title."
(Read and Write computed property)
NSBoxMBS.titleCell as NSCellMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSBoxMBS.titleFont as NSFontMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
By default, the title is drawn using the small system font (obtained using (smallSystemFontSize as the parameter of systemFontOfSize:, both NSFont class methods). If the size of the new font is different from that of the old font, the content view is resized to absorb the difference.
(Read and Write computed property)
NSBoxMBS.titlePosition as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If the new title position changes the size of the box's border area, the content view is resized to absorb the difference, and the box is marked as needing redisplay.
Use this constants: NSNoTitle, NSAboveTop, NSAtTop, NSBelowTop, NSAboveBottom, NSAtBottom and NSBelowBottom.
(Read and Write computed property)
NSBoxMBS.titleRect as NSRectMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The rectangle in which the title is drawn.
NSBoxMBS.Transparent as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
True makes the receiver transparent.
False makes the receiver opaque.
(Read and Write computed property)
The items on this page are in the following plugins: MBS MacControls Plugin.