MBS Xojo Developer Conference and Training
Join us from 3rd to 6th May 2017 in Berlin, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

NSButtonMBS.allowsMixedState as boolean
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 7.8, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

Function: A Boolean value indicating whether the button allows a mixed state.
Notes: (Read and Write property)
NSButtonMBS.alternateImage as NSImageMBS
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 7.8, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

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)
NSButtonMBS.alternateTitle as string
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 7.8, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

Function: The title that the button displays when it's in its alternate state.
Notes: (Read and Write property)
NSButtonMBS.attributedAlternateTitle as NSAttributedStringMBS
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 7.8, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

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)
NSButtonMBS.attributedTitle as NSAttributedStringMBS
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 7.8, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

Function: The title that the button displays in its normal state as an attributed string.
Notes: (Read and Write property)
NSButtonMBS.backgroundColor as NSColorMBS
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 14.2, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

Function: The background color.
Notes:
The background color is used only when drawing borderless buttons.
(Read and Write property)
NSButtonMBS.bezelColor as NSColorMBS
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 16.5, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

Function: The color of the button's bezel, in appearances that support it.
Notes: (Read and Write property)
NSButtonMBS.bezelStyle as Integer
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 7.8, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

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)
NSButtonMBS.image as NSImageMBS
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 7.8, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

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)
NSButtonMBS.imageDimsWhenDisabled as Boolean
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 14.2, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

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)
NSButtonMBS.imageHugsTitle as Boolean
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 16.5, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

Function: Whether image hugs title.
Notes:
Available in macOS 10.12 and newer.
(Read and Write property)
NSButtonMBS.imagePosition as Integer
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 14.2, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

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)
NSButtonMBS.imageScaling as Integer
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 14.2, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

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)
NSButtonMBS.isBordered as boolean
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 7.8, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

Function: A Boolean value indicating whether the button has a border.
Notes: (Read and Write property)
NSButtonMBS.isTransparent as boolean
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 7.8, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

Function: A Boolean value indicating whether the button is transparent.
Notes: (Read and Write property)
NSButtonMBS.keyEquivalent as string
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 7.8, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

Function: The key-equivalent character of the view.
Notes: (Read and Write property)
NSButtonMBS.keyEquivalentModifierMask as Integer
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 8.0, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

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)
NSButtonMBS.maxAcceleratorLevel as Integer
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

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)
NSButtonMBS.showsBorderOnlyWhileMouseInside as boolean
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 7.8, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

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)
NSButtonMBS.sound as Variant
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 14.2, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

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)
NSButtonMBS.SpringLoaded as Boolean
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

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)
NSButtonMBS.state as Integer
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 7.8, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

Function: The state of the button.
Notes:
This can be NSOnState (1), NSOffState (0), NSMixedState (-1).
(Read and Write property)
NSButtonMBS.title as string
property, Cocoa Controls, MBS CocoaControls Plugin (NSButton), class NSButtonMBS,
Plugin version: 7.8, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

Function: The title displayed on the button when it's in its normal state.
Notes: (Read and Write property)

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




Links
MBS Real Studio Plugins