Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

CocoaControlMBS.EnableMenuItems
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacFrameworks Plugin 17.1 Yes Yes Yes No No
Function: The event where you can enable menu items.

Feedback, Comments & Corrections

CocoaControlMBS.GetView as NSViewMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacFrameworks Plugin 8.4 Yes No No No No
Function: Asks your application which NSView should be used.
Example:
// an example on how to use this event:

Function GetView() As NSViewMBS
dim n as NSTextViewMBS

// create a textview:

n=new NSTextViewMBS(0, 0, CocoaControlMBS1.Width, CocoaControlMBS1.Height)
n.ContinuousSpellCheckingEnabled=true
Return n

End Function
Notes:
Return a NSView setup as you like.
You may also want to keep a reference to the view you use for easier access.

Feedback, Comments & Corrections

CocoaControlMBS.MenuAction(HitItem as MenuItem) As Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacFrameworks Plugin 17.1 Yes No No No No
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.

Feedback, Comments & Corrections

CocoaControlMBS.MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacFrameworks Plugin 17.1 Yes No No No No
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:
  • 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.

Feedback, Comments & Corrections

CocoaControlMBS.MouseDrag(x as Integer, y as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacFrameworks Plugin 17.1 Yes No No No No
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.

Feedback, Comments & Corrections

CocoaControlMBS.MouseUp(x as Integer, y as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacFrameworks Plugin 17.1 Yes No No No No
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.

Feedback, Comments & Corrections

CocoaControlMBS.ScaleFactorChanged(NewFactor as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa MBS MacFrameworks Plugin 17.1 Yes No No No No
Function: The backing store scale factor has changed.
Notes: Please invalidate any cached bitmaps or other relevant state.

Feedback, Comments & Corrections

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




Links
MBS Xojo PDF Plugins