Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/MacCocoa/Slide Views Animation
Function:
Required plugins for this example: MBS MacBase Plugin, MBS Main Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCocoa/Slide Views Animation
This example is the version from Thu, 18th Jun 2014.
Project "Slide Views Animation.rbp"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control ContainerControl11 Inherits ContainerControl1
ControlInstance ContainerControl11 Inherits ContainerControl1
End Control
Control ContainerControl21 Inherits ContainerControl2
ControlInstance ContainerControl21 Inherits ContainerControl2
End Control
Function FilePage1() As Boolean dim v1 as NSViewMBS = ContainerControl11.NSViewMBS dim v2 as NSViewMBS = ContainerControl21.NSViewMBS dim a1 as NSViewMBS = v1.animator dim a2 as NSViewMBS = v2.animator dim f1 as NSRectMBS = a1.frame dim f2 as NSRectMBS = a2.frame // move to right f2.X = Width f1.X = 0 a2.frame = f2 a1.frame = f1 Return True End Function
Function FilePage2() As Boolean dim v1 as NSViewMBS = ContainerControl11.NSViewMBS dim v2 as NSViewMBS = ContainerControl21.NSViewMBS dim a1 as NSViewMBS = v1.animator dim a2 as NSViewMBS = v2.animator dim f1 as NSRectMBS = a1.frame dim f2 as NSRectMBS = a2.frame // move to left f2.X = 0 f1.X = -Width a2.frame = f2 a1.frame = f1 Return True End Function
End Class
MenuBar MainMenuBar
MenuItem FileMenu = "&File"
MenuItem FilePage1 = "Page 1"
MenuItem FilePage2 = "Page 2"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem EditSeparator1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem EditSeparator2 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
Class ContainerControl1 Inherits ContainerControl
Control Listbox1 Inherits Listbox
ControlInstance Listbox1 Inherits Listbox
EventHandler Function CellBackgroundPaint(g As Graphics, row As Integer, column As Integer) As Boolean if row mod 2 = 0 and me.ListIndex<>row then g.ForeColor = &cEEEEFF g.FillRect 0, 0, g.Width, g.Height end if End EventHandler
End Control
End Class
Class ContainerControl2 Inherits ContainerControl
Control Canvas1 Inherits Canvas
ControlInstance Canvas1 Inherits Canvas
EventHandler Sub Open() me.Backdrop = LogoMBS(500) End EventHandler
End Control
End Class
End Project

Feedback, Comments & Corrections

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





Links
MBS Xojo Chart Plugins