Platforms to show: All Mac Windows Linux Cross-Platform

/MacFrameworks/Cocoa Controls/NSButton test


Required plugins for this example: MBS MacBase Plugin, MBS Main Plugin, MBS MacCocoa Plugin, MBS MacFrameworks Plugin, MBS MacControls Plugin

Last modified Sun, 17th Mar 2012.

You find this example project in your MBS Xojo Plugin download as a Xojo project file within the examples folder: /MacFrameworks/Cocoa Controls/NSButton test

Download this example: NSButton test.zip

Project "NSButton test.xojo_binary_project"
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:

Download this example: NSButton test.zip

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


The biggest plugin in space...