Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/MacFrameworks/Cocoa Controls/NSButton test
Function:
Required plugins for this example: MBS MacBase Plugin, MBS MacCocoa Plugin, MBS MacControls Plugin, MBS MacFrameworks Plugin, MBS Main Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacFrameworks/Cocoa Controls/NSButton test
This example is the version from Sun, 17th Mar 2012.
Project "NSButton test.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control CocoaControlMBS1 Inherits CocoaControlMBS
ControlInstance CocoaControlMBS1 Inherits CocoaControlMBS
EventHandler Function GetView() As NSViewMBS static n as new MyNSButtonMBS n.Title = "" n.bezelstyle = n.NSHelpButtonBezelStyle Return n End EventHandler
End Control
Control CocoaControlMBS2 Inherits CocoaControlMBS
ControlInstance CocoaControlMBS2 Inherits CocoaControlMBS
EventHandler Function GetView() As NSViewMBS static n as new MyNSButtonMBS n.Title = "Test" n.bezelstyle = n.NSTexturedRoundedBezelStyle Return n End EventHandler
End Control
Control CocoaControlMBS3 Inherits CocoaControlMBS
ControlInstance CocoaControlMBS3 Inherits CocoaControlMBS
EventHandler Function GetView() As NSViewMBS static n as new MyNSButtonMBS n.Title = "T" n.bezelstyle = n.NSCircularBezelStyle Return n End EventHandler
End Control
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
Class MyNSButtonMBS Inherits NSButtonMBS
EventHandler Sub Action() MsgBox "Clicked button." End EventHandler
End Class
End Project

See also:

Feedback, Comments & Corrections

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




Links
MBS FileMaker Plugins