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.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 8.2 Yes No No Yes, macOS only No
Function: Creates a new button with size 100/100 and position 0/0
Example:
dim t as new NSButtonMBS
Notes: On success the handle property is not zero.

See also:

Feedback, Comments & Corrections

NSButtonMBS.Constructor(Handle as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 10.3 Yes No No Yes, macOS only No
Function: Creates an object based on the given NSButton handle.
Example:
dim t as new NSButtonMBS(0, 0, 100, 100)
dim v as new NSButtonMBS(t.handle)

MsgBox str(v.Bounds.Width)+" x "+str(v.Bounds.Height)
Notes: The handle is casted to a NSButton and the plugin retains this handle.

See also:

Feedback, Comments & Corrections

NSButtonMBS.Constructor(left as Double, top as Double, width as Double, height as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 7.8 Yes No No Yes, macOS only No
Function: Creates a new button with the given size and position.
Example:
dim x as new NSButtonMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.

See also:

Feedback, Comments & Corrections

NSButtonMBS.Constructor(Title as String, Image as NSImageMBS = nil, Type as Integer = 0)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 16.5 Yes No No Yes, macOS only No
Function: Creates a new button with default settings.
Notes:
For macOS 10.12, we use the convenience functions from Apple.
For older systems, we use our own code.
Title is the title to use. Can be empty.
Image is the image to use. Can be nil.
Type is the type, e.g. NSMomentaryLightButton.

See also:

Feedback, Comments & Corrections

NSButtonMBS.setButtonType(buttonType as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 7.8 Yes No No Yes, macOS only No
Function: Sets how the button highlights while pressed and how it shows its state.
Notes:
Use this constants:

NSMomentaryLightButton= 0
NSPushOnPushOffButton= 1
NSToggleButton= 2
NSSwitchButton= 3
NSRadioButton= 4
NSMomentaryChangeButton= 5
NSOnOffButton= 6
NSMomentaryPushInButton= 7

Feedback, Comments & Corrections

NSButtonMBS.setNextState
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 7.8 Yes No No Yes, macOS only No
Function: Sets the view to its next state.
Notes: If the button has three states, it cycles through them in this order: on, off, mixed, on, and so forth. If the button has two states, it toggles between them.

Feedback, Comments & Corrections

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




Links
MBS FileMaker Plugins