Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

/CocoaControls/Cocoa Controls
Function: You find this example project in your Plugins Download as a Xojo (Real Studio) project file within the examples folder: /CocoaControls/Cocoa Controls
Project "Cocoa Controls.rbp"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control NSButtonControlMBS1 Inherits NSButtonControlMBS
ControlInstance NSButtonControlMBS1 Inherits NSButtonControlMBS
EventHandler Sub Action() log CurrentMethodName End EventHandler
EventHandler Sub Close() log CurrentMethodName End EventHandler
EventHandler Function KeyDown(Key As String) As Boolean log CurrentMethodName End EventHandler
EventHandler Sub KeyUp(Key As String) log CurrentMethodName End EventHandler
EventHandler Sub Open() log CurrentMethodName End EventHandler
End Control
Control NSPopUpButtonControlMBS1 Inherits NSPopUpButtonControlMBS
ControlInstance NSPopUpButtonControlMBS1 Inherits NSPopUpButtonControlMBS
EventHandler Sub Action() dim p as NSPopUpButtonMBS = me.View dim m as NSMenuItemMBS = p.selectedItem if m<>nil then log CurrentMethodName+": "+m.title else log CurrentMethodName+": no selection" end if End EventHandler
EventHandler Sub Close() log CurrentMethodName End EventHandler
EventHandler Function KeyDown(Key As String) As Boolean log CurrentMethodName End EventHandler
EventHandler Sub KeyUp(Key As String) log CurrentMethodName End EventHandler
EventHandler Sub Open() log CurrentMethodName dim p as NSPopUpButtonMBS = me.View p.addItemWithTitle "Hello" p.addItemWithTitle "World" End EventHandler
End Control
Control NSSearchFieldControlMBS1 Inherits NSSearchFieldControlMBS
ControlInstance NSSearchFieldControlMBS1 Inherits NSSearchFieldControlMBS
EventHandler Sub Action() log CurrentMethodName End EventHandler
EventHandler Sub Close() log CurrentMethodName End EventHandler
EventHandler Function KeyDown(Key As String) As Boolean log CurrentMethodName End EventHandler
EventHandler Sub KeyUp(Key As String) log CurrentMethodName End EventHandler
EventHandler Sub Open() log CurrentMethodName End EventHandler
End Control
Control NSTextFieldControlMBS1 Inherits NSTextFieldControlMBS
ControlInstance NSTextFieldControlMBS1 Inherits NSTextFieldControlMBS
EventHandler Sub Action() log CurrentMethodName End EventHandler
EventHandler Sub Close() log CurrentMethodName End EventHandler
EventHandler Function KeyDown(Key As String) As Boolean log CurrentMethodName End EventHandler
EventHandler Sub KeyUp(Key As String) log CurrentMethodName End EventHandler
EventHandler Sub Open() log CurrentMethodName End EventHandler
End Control
Control NSTextViewControlMBS1 Inherits NSTextViewControlMBS
ControlInstance NSTextViewControlMBS1 Inherits NSTextViewControlMBS
EventHandler Sub Close() log CurrentMethodName End EventHandler
EventHandler Sub Open() log CurrentMethodName dim t as NSTextViewMBS = me.View t.isRichText = true t.isEditable = true t.GrammarCheckingEnabled = true t.isSelectable = true End EventHandler
EventHandler Function shouldChangeTextInRange(affectedCharRange as NSRangeMBS, replacementString as string) As boolean log CurrentMethodName Return true End EventHandler
EventHandler Sub textDidBeginEditing() log CurrentMethodName End EventHandler
EventHandler Sub textDidChange() log CurrentMethodName End EventHandler
EventHandler Sub textDidEndEditing() log CurrentMethodName End EventHandler
EventHandler Function textShouldBeginEditing() As boolean log CurrentMethodName End EventHandler
EventHandler Function textShouldEndEditing() As boolean log CurrentMethodName End EventHandler
EventHandler Sub textViewDidChangeSelection() log CurrentMethodName End EventHandler
End Control
Control Listbox1 Inherits Listbox
ControlInstance Listbox1 Inherits Listbox
End Control
Sub log(s as string) Listbox1.InsertRow 0,s End Sub
End Class
MenuBar MainMenuBar
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem EditSeparator1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem EditSeparator2 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
End Project

Feedback, Comments & Corrections




Links
MBS Xojo Chart Plugins