Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSSwitchControlMBS control.
NSSwitchControlMBS.Action
Function:
The action event.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 22.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
NSSwitchControlMBS.BoundsChanged
Function:
The event called when the bounds, but not the frame, changed.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 22.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
NSSwitchControlMBS.Close
Function:
The control is about to close.
In Xojo version 2021r3 and newer this event is named Closing.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 22.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
The control is about to close.
In Xojo version 2021r3 and newer this event is named Closing.
NSSwitchControlMBS.Closing
Function:
The control is about to close.
In older Xojo versions, this event is named Close.
Type | Topic | Version |
event | Cocoa Controls | 22.1 |
The control is about to close.
In older Xojo versions, this event is named Close.
NSSwitchControlMBS.ConstructContextualMenu(base as MenuItem, x as Integer, y as Integer) as Boolean
Function:
This event is called when it is appropriate to display a contextual menu for the control.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 22.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
NSSwitchControlMBS.ContextualMenuAction(hitItem as MenuItem) as Boolean
Function:
Called when a menuitem is choosen.
Notes: 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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 22.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes: 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.
NSSwitchControlMBS.EnableMenuItems
Function:
The event where you can enable menu items.
In Xojo version 2021r3 and newer this event is named MenuBarSelected.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 22.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
The event where you can enable menu items.
In Xojo version 2021r3 and newer this event is named MenuBarSelected.
NSSwitchControlMBS.FocusLost
Function:
The control lost focus.
In older Xojo versions, this event is named LostFocus.
Notes: This only fires if the control itself lost focus and not a sub control.
Type | Topic | Version |
event | Cocoa Controls | 22.1 |
The control lost focus.
In older Xojo versions, this event is named LostFocus.
Notes: This only fires if the control itself lost focus and not a sub control.
NSSwitchControlMBS.FocusReceived
Function:
The control itself got focus.
In older Xojo versions, this event is named GotFocus.
Notes: This only fires if the control itself got focus and not a sub control.
Type | Topic | Version |
event | Cocoa Controls | 22.1 |
The control itself got focus.
In older Xojo versions, this event is named GotFocus.
Notes: This only fires if the control itself got focus and not a sub control.
NSSwitchControlMBS.FrameChanged
Function:
The event called when the frame changed.
Notes: This event notifies you, that the control changed it's bounding frame, which is position and/or size.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 22.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes: This event notifies you, that the control changed it's bounding frame, which is position and/or size.
NSSwitchControlMBS.GotFocus
Function:
The control itself got focus.
In Xojo version 2021r3 and newer this event is named FocusReceived.
Notes: This only fires if the control itself got focus and not a sub control.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 22.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
The control itself got focus.
In Xojo version 2021r3 and newer this event is named FocusReceived.
Notes: This only fires if the control itself got focus and not a sub control.
NSSwitchControlMBS.LostFocus
Function:
The control lost focus.
In Xojo version 2021r3 and newer this event is named FocusLost.
Notes: This only fires if the control itself lost focus and not a sub control.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 22.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
The control lost focus.
In Xojo version 2021r3 and newer this event is named FocusLost.
Notes: This only fires if the control itself lost focus and not a sub control.
NSSwitchControlMBS.MenuBarSelected
Function:
The event where you can enable menu items.
In older Xojo versions, this event is named EnableMenuItems.
Type | Topic | Version |
event | Cocoa Controls | 22.1 |
The event where you can enable menu items.
In older Xojo versions, this event is named EnableMenuItems.
NSSwitchControlMBS.MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
Function:
The mouse button was pressed inside the control’s region at the location passed in to x, y.
Notes:
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:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 22.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
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.
NSSwitchControlMBS.MouseDrag(x as Integer, y as Integer)
Function:
This event fires continuously after the mouse button was pressed inside the Control.
Notes:
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 22.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
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.
NSSwitchControlMBS.MouseUp(x As Integer, y As Integer)
Function:
The mouse button was released.
Notes: Use the x and y parameters to determine if the mouse button was released within the control's boundaries.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 22.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes: Use the x and y parameters to determine if the mouse button was released within the control's boundaries.
NSSwitchControlMBS.Open
Function:
The control is about to was created and you can initialize it.
In Xojo version 2021r3 and newer this event is named Opening.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 22.1 | ✅ 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.
NSSwitchControlMBS.Opening
Function:
The control is about to was created and you can initialize it.
In older Xojo versions, this event is named Open.
Type | Topic | Version |
event | Cocoa Controls | 22.1 |
The control is about to was created and you can initialize it.
In older Xojo versions, this event is named Open.
NSSwitchControlMBS.ScaleFactorChanged(NewFactor as double)
Function:
The backing store scale factor has changed.
Notes: Please invalidate any cached bitmaps or other relevant state.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 22.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes: Please invalidate any cached bitmaps or other relevant state.
The items on this page are in the following plugins: MBS MacControls Plugin.
