Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSTextFieldMBS class.

NSTextFieldMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a new text field with size 100/100 and position 0/0
Example
Var t as new NSTextFieldMBS

On success the handle property is not zero.

See also:

NSTextFieldMBS.Constructor(Handle as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates an object based on the given NSTextField handle.
Example
Var t as new NSTextFieldMBS(0, 0, 100, 100)
Var v as new NSTextFieldMBS(t.handle)

MsgBox str(v.Bounds.Width)+" x "+str(v.Bounds.Height)

The handle is casted to a NSTextField and the plugin retains this handle.

See also:

NSTextFieldMBS.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 MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a new text field with the given size and position.
Example
Var x as new NSTextFieldMBS(0, 0, 100, 100)

On success the handle property is not zero.

See also:

NSTextFieldMBS.placeholderAttributedStrings as NSAttributedStringMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 25.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
An array of attrobuted strings that will be animated to cycle through one by one when the textField is first responder.

No animation happend when there is only string in the array, or when text field is not first responder.
The text field's placeholderString property points to the first string in placeholderStrings.

For macOS 26 or newer.
Please use setPlaceholderAttributedStrings to set this.

NSTextFieldMBS.placeholderStrings as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 25.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
An array of strings that will be animated to cycle through one by one when the textField is first responder.

No animation happend when there is only string in the array, or when text field is not first responder.
The text field's placeholderString property points to the first string in placeholderStrings.

For macOS 26 or newer.
Please use setPlaceholderStrings to set this.

NSTextFieldMBS.selectText

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Ends editing and selects the entire contents of the receiver if it's selectable.

If the receiver isn't in some window's view hierarchy, this method has no effect.

NSTextFieldMBS.setPlaceholderAttributedStrings(values() as NSAttributedStringMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 25.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets an array of attrobuted strings that will be animated to cycle through one by one when the textField is first responder.

No animation happend when there is only string in the array, or when text field is not first responder.
The text field's placeholderString property points to the first string in placeholderStrings.

For macOS 26 or newer.

NSTextFieldMBS.setPlaceholderStrings(values() as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 25.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Set an array of strings that will be animated to cycle through one by one when the textField is first responder.

No animation happend when there is only string in the array, or when text field is not first responder.
The text field's placeholderString property points to the first string in placeholderStrings.

For macOS 26 or newer.

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


The biggest plugin in space...