Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/MacFrameworks/Calendar List
Function:
Required plugins for this example: MBS MacBase 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/Calendar List
This example is the version from Mon, 6th Oct 2013.
Project "Calendar List.rbp"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control List Inherits Listbox
ControlInstance List Inherits Listbox
EventHandler Function CellBackgroundPaint(g As Graphics, row As Integer, column As Integer) As Boolean if column = 4 and row<me.ListCount then dim n as NSColorMBS = me.CellTag(row, column) dim c as color = n.colorValue g.ForeColor = c g.FillRect 0, 0, g.Width, g.Height Return true end if End EventHandler
End Control
EventHandler Sub Open() dim cs as new CalCalendarStoreMBS dim calendars(-1) as CalCalendarMBS = cs.calendars for each cc as CalCalendarMBS in calendars List.AddRow cc.Title List.Cell(List.LastIndex,1)=cc.uid List.Cell(List.LastIndex,2)=cc.type List.Cell(List.LastIndex,3)=cc.notes List.Celltag(List.LastIndex,4)=cc.color List.Cell(List.LastIndex,5)=yes(cc.isEditable) next End EventHandler
Function yes(b as Boolean) As string if b then Return "yes" else Return "no" end if End Function
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 MacFrameworks Plugin.




Links
MBS FileMaker blog