Platforms to show: All Mac Windows Linux Cross-Platform
/MacControls/NSButtonControl tests/NSButtonControl1
Required plugins for this example: MBS MacBase Plugin, MBS MacControls Plugin, MBS MacCocoa Plugin, MBS Main Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacControls/NSButtonControl tests/NSButtonControl1
This example is the version from Tue, 9th Dec 2013.
Project "NSButtonControl1.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control NSButtonControlMBS1 Inherits NSButtonControlMBS
ControlInstance NSButtonControlMBS1 Inherits NSButtonControlMBS
EventHandler Sub Action()
clicked me
End EventHandler
End Control
Control Label1 Inherits Label
ControlInstance Label1 Inherits Label
End Control
Sub Clicked(n as NSButtonControlMBS)
#if TargetCocoa then
MsgBox "Clicked"
#endif
End Sub
End Class
MenuBar MainMenuBar
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem EditSeparator1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem EditSeparator2 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project
See also:
The items on this page are in the following plugins: MBS MacControls Plugin.