Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

NSButtonMBS.allowsMixedState as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 7.8 Yes No No Yes, macOS only No
Function: A Boolean value indicating whether the button allows a mixed state.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.alternateImage as NSImageMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 7.8 Yes No No Yes, macOS only No
Function: The image that appears on the button when it's in its alternate state.
Notes:
The image displayed by the button when it's in its alternate state, or nil if there is no alternate image. Note that some button types don't display an alternate image. Buttons don't display images by default.
(Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.alternateTitle as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 7.8 Yes No No Yes, macOS only No
Function: The title that the button displays when it's in its alternate state.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.attributedAlternateTitle as NSAttributedStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 7.8 Yes No No Yes, macOS only No
Function: The title that appears on the button when it's in its alternate state to the given attributed string.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.attributedTitle as NSAttributedStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 7.8 Yes No No Yes, macOS only No
Function: The title that the button displays in its normal state as an attributed string.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.backgroundColor as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 14.2 Yes No No Yes, macOS only No
Function: The background color.
Notes:
The background color is used only when drawing borderless buttons.
(Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.bezelColor as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 16.5 Yes No No Yes, macOS only No
Function: The color of the button's bezel, in appearances that support it.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.bezelStyle as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 7.8 Yes No No Yes, macOS only No
Function: The appearance of the border, if the view has one.
Notes:
Use this constants:

NSRoundedBezelStyle= 1
NSRegularSquareBezelStyle= 2
NSThickSquareBezelStyle= 3
NSThickerSquareBezelStyle= 4
NSDisclosureBezelStyle= 5
NSShadowlessSquareBezelStyle= 6
NSCircularBezelStyle= 7
NSTexturedSquareBezelStyle= 8
NSHelpButtonBezelStyle= 9
NSSmallSquareBezelStyle= 10
NSTexturedRoundedBezelStyle= 11
NSRoundRectBezelStyle= 12
NSRecessedBezelStyle= 13
NSRoundedDisclosureBezelStyle= 14
(Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.image as NSImageMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 7.8 Yes No No Yes, macOS only No
Function: The view's image.
Notes:
A button's image is displayed when the button is in its normal state, or all the time for a button that doesn't change its contents when highlighting or displaying its alternate state.
(Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.imageDimsWhenDisabled as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 14.2 Yes No No Yes, macOS only No
Function: Whether the receiver’s image appears "dim" when the button cell is disabled.
Notes:
True to indicate that the button's image should dim when the button is disabled.

By default, all button types except NSSwitchButton and NSRadioButton do dim when disabled. When NSSwitchButtons and NSRadioButtons are disabled, only the associated text dims. The default setting for this condition is reasserted whenever you set ButtonType, so be sure to specify the button cell’s type before you set ImageDimsWhenDisabled.
(Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.imageHugsTitle as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 16.5 Yes No No Yes, macOS only No
Function: Whether image hugs title.
Notes:
Available in macOS 10.12 and newer.
(Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.imagePosition as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 14.2 Yes No No Yes, macOS only No
Function: The position of the button's image relative to its title.
Notes:
Value can be:

NSNoImage0The cell doesn’t display an image.
NSImageOnly1The cell displays an image, but not a title.
NSImageLeft2The image is to the left of the title.
NSImageRight3The image is to the right of the title.
NSImageBelow4The image is below the title.
NSImageAbove5The image is above the title.
NSImageOverlaps6The image overlaps the title.
(Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.imageScaling as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 14.2 Yes No No Yes, macOS only No
Function: The scale factor for the receiver’s image.
Notes:
These constants specify a cell’s image scaling behavior.

NSImageScaleProportionallyDown0If it is too large for the destination, scale the image down while preserving the aspect ratio.
NSImageScaleAxesIndependently1Scale each dimension to exactly fit destination. This setting does not preserve the aspect ratio of the image.
NSImageScaleNone2Do not scale the image.
NSImageScaleProportionallyUpOrDown3Scale the image to its maximum possible dimensions while both staying within the destination area and preserving its aspect ratio.

Available in OS X v10.5 and later.
(Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.isBordered as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 7.8 Yes No No Yes, macOS only No
Function: A Boolean value indicating whether the button has a border.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.isTransparent as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 7.8 Yes No No Yes, macOS only No
Function: A Boolean value indicating whether the button is transparent.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.keyEquivalent as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 7.8 Yes No No Yes, macOS only No
Function: The key-equivalent character of the view.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.keyEquivalentModifierMask as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 8.0 Yes No No Yes, macOS only No
Function: the controls's keyboard equivalent modifier mask.
Example:
const NSShiftKeyMask=131.072
const NSControlKeyMask=262144
const NSAlternateKeyMask=524288
const NSCommandKeyMask=1048576

dim d as NSButtonMBS // your button
d.KeyEquivalent="A"
d.KeyEquivalentModifierMask=NSShiftKeyMask+NSCommandKeyMask+NSAlternateKeyMask // command-option-shift
Notes:
Constants for the mask:

NSAlphaShiftKeyMask = 65536
Set if Caps Lock key is pressed.
Available in Mac OS X v10.0 and later.

NSShiftKeyMask = 131072
Set if Shift key is pressed.
Available in Mac OS X v10.0 and later.

NSControlKeyMask = 262144
Set if Control key is pressed.
Available in Mac OS X v10.0 and later.

NSAlternateKeyMask = 524288
Set if Option or Alternate key is pressed.
Available in Mac OS X v10.0 and later.

NSCommandKeyMask = 1048576
Set if Command key is pressed.
Available in Mac OS X v10.0 and later.

NSNumericPadKeyMask = 2097152
Set if any key in the numeric keypad is pressed. The numeric keypad is generally on the right side of the keyboard. This is also set if any of the arrow keys are pressed (NSUpArrowFunctionKey, NSDownArrowFunctionKey, NSLeftArrowFunctionKey, and NSRightArrowFunctionKey).
Available in Mac OS X v10.0 and later.

NSHelpKeyMask = 4194304
Set if the Help key is pressed.
Available in Mac OS X v10.0 and later.

NSFunctionKeyMask = 8388608
Set if any function key is pressed. The function keys include the F keys at the top of most keyboards (F1, F2, and so on) and the navigation keys in the center of most keyboards (Help, Forward Delete, Home, End, Page Up, Page Down, and the arrow keys).
Available in Mac OS X v10.0 and later.

NSDeviceIndependentModifierFlagsMask = 16777216
Used to retrieve only the device-independent modifier flags, allowing applications to mask off the device-dependent modifier flags, including event coalescing information.
Available in Mac OS X v10.4.
(Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.maxAcceleratorLevel as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 15.2 Yes No No Yes, macOS only No
Function: Configures the maximum allowed level for an NSMultiLevelAcceleratorButton, allowed values range from [1,5].
Notes:
Defaults to 2.
Available on Mac OS X 10.10.3.
(Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.showsBorderOnlyWhileMouseInside as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 7.8 Yes No No Yes, macOS only No
Function: Whether the view's border is displayed only when the cursor is over the button.
Notes:
If isBordered returns false, the border is never displayed, regardless of what this method returns.
(Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.sound as Variant
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 14.2 Yes No No Yes, macOS only No
Function: The sound played when the user presses the button.
Notes:
The sound that should be played when the user presses the button. The sound is played during a mouse-down event, such as NSLeftMouseDown.
Value is NSSoundMBS object.
(Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.SpringLoaded as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 15.2 Yes No No Yes, macOS only No
Function: Sends action on deep-press or extended hover while dragging.
Notes:
Defaults to false.
Available on Mac OS X 10.10.3.
(Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.state as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 7.8 Yes No No Yes, macOS only No
Function: The state of the button.
Notes:
This can be NSOnState (1), NSOffState (0), NSMixedState (-1).
(Read and Write property)

Feedback, Comments & Corrections

NSButtonMBS.title as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS CocoaControls Plugin 7.8 Yes No No Yes, macOS only No
Function: The title displayed on the button when it's in its normal state.
Notes: (Read and Write property)

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS CocoaControls Plugin.




Links
MBS Xojo tutorial videos