Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSPathControlControlMBS control.

NSPathControlControlMBS.Action

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.0 ✅ Yes ❌ No ❌ No ❌ No
This event is called when user clicks on a date/time and changes something.

NSPathControlControlMBS.BoundsChanged

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.0 ✅ Yes ❌ No ❌ No ❌ No
The event called when the bounds, but not the frame, changed.

NSPathControlControlMBS.Close

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.0 ✅ Yes ❌ No ❌ No ❌ No

The control is about to close.
In Xojo version 2021r3 and newer this event is named Closing.

NSPathControlControlMBS.Closing

Type Topic Version
event Cocoa Controls 24.0

The control is about to close.
In older Xojo versions, this event is named Close.

NSPathControlControlMBS.ConstructContextualMenu(base as MenuItem, x as Integer, y as Integer) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.0 ✅ Yes ❌ No ❌ No ❌ No
This event is called when it is appropriate to display a contextual menu for the control.

NSPathControlControlMBS.ContextualMenuAction(hitItem as MenuItem) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.0 ✅ Yes ❌ No ❌ No ❌ No
Called when a menuitem is choosen.

This allows the control to react on its relevant menu items. Please return true if you handled it or false to give others a chance.

NSPathControlControlMBS.didCloseContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.1 ✅ Yes ❌ No ❌ No ❌ No
Did close contextual menu.

Allows you to restart any animation you may have stopped in the willShowContextualMenu event.

NSPathControlControlMBS.DoubleClick

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.0 ✅ Yes ❌ No ❌ No ❌ No
Called when a double click happened.

May call Action event before.

NSPathControlControlMBS.EnableMenuItems

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.0 ✅ Yes ❌ No ❌ No ❌ No

The event where you can enable menu items.
In Xojo version 2021r3 and newer this event is named MenuBarSelected.

NSPathControlControlMBS.FocusLost

Type Topic Version
event Cocoa Controls 24.0

The control lost focus.
In older Xojo versions, this event is named LostFocus.

This only fires if the control itself lost focus and not a sub control.

NSPathControlControlMBS.FocusReceived

Type Topic Version
event Cocoa Controls 24.0

The control itself got focus.
In older Xojo versions, this event is named GotFocus.

This only fires if the control itself got focus and not a sub control.

NSPathControlControlMBS.FrameChanged

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.0 ✅ Yes ❌ No ❌ No ❌ No
The event called when the frame changed.

This event notifies you, that the control changed it's bounding frame, which is position and/or size.

NSPathControlControlMBS.GotFocus

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.0 ✅ Yes ❌ No ❌ No ❌ No

The control itself got focus.
In Xojo version 2021r3 and newer this event is named FocusReceived.

This only fires if the control itself got focus and not a sub control.

NSPathControlControlMBS.LostFocus

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.0 ✅ Yes ❌ No ❌ No ❌ No

The control lost focus.
In Xojo version 2021r3 and newer this event is named FocusLost.

This only fires if the control itself lost focus and not a sub control.

NSPathControlControlMBS.MenuBarSelected

Type Topic Version
event Cocoa Controls 24.0

The event where you can enable menu items.
In older Xojo versions, this event is named EnableMenuItems.

NSPathControlControlMBS.MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.0 ✅ Yes ❌ No ❌ No ❌ No
The mouse button was pressed inside the control’s region at the location passed in to x, y.

The coordinates x and y are local to the control, i.e. they represent the position of the mouse click relative to the upper-left corner or the Control.
Return True if you are going to handle the MouseDown. In such a case:

  • The Action event, if any, will not execute and the state of the object will not change.
  • You will receive the MouseDrag and MouseUp events.
If you return False, the system handles the MouseDown so the above event handlers do not get called.

NSPathControlControlMBS.MouseDrag(x as Integer, y as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.0 ✅ Yes ❌ No ❌ No ❌ No
This event fires continuously after the mouse button was pressed inside the Control.

Mouse location is local to the control passed in to x, y.
As this event is fired continuously (hundreds of time per second), it is your responsibility to determine if the mouse has really moved.

NSPathControlControlMBS.MouseUp(x As Integer, y As Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.0 ✅ Yes ❌ No ❌ No ❌ No
The mouse button was released.

Use the x and y parameters to determine if the mouse button was released within the control's boundaries.

NSPathControlControlMBS.Open

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.0 ✅ Yes ❌ No ❌ No ❌ No

The control is about to was created and you can initialize it.
In Xojo version 2021r3 and newer this event is named Opening.
Example
Sub Open() Handles Open
// set small font
Var p As NSPathControlMBS = Me.View
p.Font = NSFontMBS.systemFontOfSize(10)

// disable focus ring
p.focusRingType = p.NSFocusRingTypeNone
End Sub

NSPathControlControlMBS.Opening

Type Topic Version
event Cocoa Controls 24.0

The control is about to was created and you can initialize it.
In older Xojo versions, this event is named Open.
Example
Sub Open() Handles Open
// set small font
Var p As NSPathControlMBS = Me.View
p.Font = NSFontMBS.systemFontOfSize(10)

// disable focus ring
p.focusRingType = p.NSFocusRingTypeNone
End Sub

NSPathControlControlMBS.ScaleFactorChanged(NewFactor as double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.0 ✅ Yes ❌ No ❌ No ❌ No
The backing store scale factor has changed.

Please invalidate any cached bitmaps or other relevant state.

NSPathControlControlMBS.willDisplayOpenPanel(openPanel as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.0 ✅ Yes ❌ No ❌ No ❌ No
Implement this method to customize the Open panel shown by a pop-up–style path.

This method is called before the Open panel is shown but after its allowed file types are set to the cell's allowed types. At this time, you can further customize the Open panel as required. This method is called only when the style is set to NSPathStylePopUp. Implementation of this method is optional.

openPanel is a NSOpenPanelMBS object.

NSPathControlControlMBS.willPopUpMenu(menu as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.0 ✅ Yes ❌ No ❌ No ❌ No
Implement this method to customize the menu of a pop-up–style path.

This event is called before the pop-up menu is shown. At this time, you can further customize the menu as required, adding and removing items. This method is called only when the style is set to NSPathStylePopUp. Implementation of this method is optional.

Menu is a NSMenuMBS object.

NSPathControlControlMBS.willShowContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacCocoa Plugin 24.1 ✅ Yes ❌ No ❌ No ❌ No
Will show contextual menu.

Your chance to modify the menu before it is shown, e.g. to add menu entries.

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


The biggest plugin in space...