Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/MacCocoa/Fun with ImageWell and NSImageViewMBS
Function:
Required plugins for this example: MBS MacBase Plugin, MBS MacCocoa Plugin, MBS MacControls Plugin, MBS Main Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCocoa/Fun with ImageWell and NSImageViewMBS
This example is the version from Sun, 23th Sep 2017.
Project "Fun with ImageWell and NSImageViewMBS.rbp"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
EventHandler Sub Open() if TargetCocoa then ' okay else MsgBox "This example can only work if you use the Cocoa target in Xojo." end if End EventHandler
End Class
Class Window1 Inherits Window
Control ImageWell1 Inherits ImageWell
ControlInstance ImageWell1 Inherits ImageWell
EventHandler Sub Open() me.Image = LogoMBS(80) End EventHandler
End Control
Control ImageWell2 Inherits ImageWell
ControlInstance ImageWell2 Inherits ImageWell
EventHandler Sub Open() me.Image = LogoMBS(80) me.NSImageViewMBS.imageFrameStyle = NSImageViewMBS.NSImageFramePhoto End EventHandler
End Control
Control ImageWell3 Inherits ImageWell
ControlInstance ImageWell3 Inherits ImageWell
EventHandler Sub Open() me.Image = LogoMBS(80) me.NSImageViewMBS.imageFrameStyle = NSImageViewMBS.NSImageFrameGrayBezel End EventHandler
End Control
Control ImageWell4 Inherits ImageWell
ControlInstance ImageWell4 Inherits ImageWell
EventHandler Sub Open() me.Image = LogoMBS(80) me.NSImageViewMBS.imageFrameStyle = NSImageViewMBS.NSImageFrameGroove End EventHandler
End Control
Control ImageWell5 Inherits ImageWell
ControlInstance ImageWell5 Inherits ImageWell
EventHandler Sub Open() me.Image = LogoMBS(80) me.NSImageViewMBS.imageFrameStyle = NSImageViewMBS.NSImageFrameButton End EventHandler
End Control
Control ImageWell7 Inherits ImageWell
ControlInstance ImageWell7 Inherits ImageWell
EventHandler Sub Open() me.Image = LogoMBS(80) me.NSImageViewMBS.imageAlignment = NSImageViewMBS.NSImageAlignTopRight me.NSImageViewMBS.imageFrameStyle = NSImageViewMBS.NSImageFramePhoto End EventHandler
End Control
Control ImageWell8 Inherits ImageWell
ControlInstance ImageWell8 Inherits ImageWell
EventHandler Sub Open() me.Image = LogoMBS(80) me.NSImageViewMBS.imageAlignment = NSImageViewMBS.NSImageAlignBottomLeft me.NSImageViewMBS.imageFrameStyle = NSImageViewMBS.NSImageFramePhoto End EventHandler
End Control
Control ImageWell9 Inherits ImageWell
ControlInstance ImageWell9 Inherits ImageWell
EventHandler Sub Open() me.Image = LogoMBS(80) me.NSImageViewMBS.imageScaling = NSImageViewMBS.NSScaleToFit me.NSImageViewMBS.imageFrameStyle = NSImageViewMBS.NSImageFramePhoto End EventHandler
End Control
Control ImageWell10 Inherits ImageWell
ControlInstance ImageWell10 Inherits ImageWell
EventHandler Sub Open() me.Image = LogoMBS(80) me.NSImageViewMBS.imageScaling = NSImageViewMBS.NSScaleProportionally me.NSImageViewMBS.imageFrameStyle = NSImageViewMBS.NSImageFramePhoto End EventHandler
End Control
Control ImageWell11 Inherits ImageWell
ControlInstance ImageWell11 Inherits ImageWell
EventHandler Sub Open() me.Image = LogoMBS(80) me.NSImageViewMBS.alphaValue = 0.5 End EventHandler
End Control
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
End Project

See also:

Feedback, Comments & Corrections

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




Links
MBS Xojo Chart Plugins