Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/MacBase/NSGraphicsMBS draw to view
Function:
Required plugins for this example: MBS MacBase 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: /MacBase/NSGraphicsMBS draw to view
This example is the version from Sun, 17th Mar 2012.
Project "NSGraphicsMBS draw to view.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control Rectangle1 Inherits Rectangle
ControlInstance Rectangle1 Inherits Rectangle
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() dim n as NSViewMBS = Rectangle1.NSViewMBS dim g as new NSGraphicsMBS(n) g.SetColorRGB 0,0,1 g.fillRect(0,0,100,100,g.NSCompositeCopy) End EventHandler
End Control
Control CheckBox1 Inherits CheckBox
ControlInstance CheckBox1 Inherits CheckBox
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action() dim n as NSViewMBS = checkbox1.NSViewMBS dim g as new NSGraphicsMBS(n) g.SetColorRGB 0,0,1 g.fillRect(0,0,100,100,g.NSCompositeCopy) End EventHandler
End Control
EventHandler Sub Open() if not TargetCocoa then MsgBox "This sample requires Cocoa target!" end if End EventHandler
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
End Project

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins