Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSControlMBS class.

NSControlMBS.Action

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 8.0 ✅ Yes ❌ No ❌ No ❌ No
The control's action was triggered.

For a button if it was pressed.

NSControlMBS.TextDidBeginEditing(fieldEditor as NSTextMBS, notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 14.0 ✅ Yes ❌ No ❌ No ❌ No
Sent when a control with editable text begins an editing session.

Notification: The notification object. The name of the notification is always NSControlTextDidBeginEditingNotification.

This event is invoked when the user begins editing text in a control such as a text field or a form field. The control posts a NSControlTextDidBeginEditingNotification notification, and if the control's subclass implements this event, it is automatically registered to receive the notification. The field editor is also delivered for inspection.

See TextDidEndEditing for an explanation of why you may not always get one invocation of TextDidBeginEditing for each invocation of TextDidEndEditing.

NSControlMBS.TextDidChange(fieldEditor as NSTextMBS, notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 14.0 ✅ Yes ❌ No ❌ No ❌ No
Sent when the text in the receiving control changes.

Notification: The notification object. The name of the notification is always NSControlTextDidChangeNotification.

This event is invoked when text in a control such as a text field or form changes. The control posts a NSControlTextDidChangeNotification notification, and if the control's subclass implements this event, it is automatically registered to receive the notification. The field editor is provided as parameter for inspection.

NSControlMBS.TextDidEndEditing(fieldEditor as NSTextMBS, notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 14.0 ✅ Yes ❌ No ❌ No ❌ No
Sent when a control with editable text ends an editing session.

Notification: The notification object. The name of the notification is always NSControlTextDidEndEditingNotification.

This event is invoked when the user stops editing text in a control such as a text field or form. The control posts a NSControlTextDidEndEditingNotification notification, and if the control' subclass implements this event, it is automatically registered to receive the notification. The field editor is also provided for inspection.

Warning: In some cases, such as when editing within an instance of NSOutlineView, this method may be invoked without a previous invocation of TextDidBeginEditing. You will only get the TextDidBeginEditing: notification if the user actually types something, but you can get the TextDidEndEditing notification if the user just double-clicks the field and then clicks outside the field, without typing.

NSControlMBS.textShouldBeginEditing(fieldEditor as NSTextMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 8.0 ✅ Yes ❌ No ❌ No ❌ No
The event called to decide whether text editing should be allowed.

Return true to allow text editing or false to deny.
Be aware that an event in Xojo without return will cause false to be returned.

NSControlMBS.textShouldEndEditing(fieldEditor as NSTextMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 8.0 ✅ Yes ❌ No ❌ No ❌ No
The event called to decide whether ending text editing should be allowed.

Return true to allow end of text editing or false to deny.
Be aware that an event in Xojo without return will cause false to be returned.

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


The biggest plugin in space...