Difference between revisions of "CalendarView"
From Jeremie Leroy - XOJO Controls Wiki
m (159 revisions imported) |
|||
(22 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
Displays a Calendar in several formats (Year, Month, Week, Day, ...) that presents CalendarEvents.<br/> | Displays a Calendar in several formats (Year, Month, Week, Day, ...) that presents CalendarEvents.<br/> | ||
This custom control based on a Canvas is similar to iCal on Mac OS and Google Calendar. | This custom control based on a Canvas is similar to iCal on Mac OS and Google Calendar. | ||
Line 5: | Line 4: | ||
{| class=eventTable | {| class=eventTable | ||
|- | |- | ||
− | |class=titleClass colspan= | + | |class=titleClass colspan=2|Events |
|- | |- | ||
− | |{{Event | name= | + | |width=50%|{{Event | name=CalendarEventFilter | params=cEvent As CalendarEvent | description= | returntype=Boolean | newinversion=1.4.0}} |
+ | |width=50%|{{Event | name=NewEvent | params=StartDate As Date, EndDate As Date | description= | newinversion=}} | ||
|- | |- | ||
− | |{{Event | name= | + | |width=50%|{{Event | name=ConstructContextualMenu | params=base As MenuItem, x As Integer, y As Integer, cEvent As CalendarEvent | description= | returntype=Boolean | newinversion=1.1.1}} |
+ | |width=50%|{{Event | name=Open | description= | newinversion=}} | ||
|- | |- | ||
− | |{{Event | name= | + | |width=50%|{{Event | name=DateSelected | params=D As Date | description= | newinversion=}} |
+ | |width=50%|{{Event | name=ShowHelptag | params=Str As String, cEvent As CalendarEvent | description= | returntype=Boolean | newinversion=}} | ||
|- | |- | ||
− | |{{Event | name= | + | |width=50%|{{Event | name=DoubleClick | params=X As Integer, Y As Integer | description= | newinversion=}} |
+ | |width=50%|{{Event | name=ViewChange | params=StartDate As Date, EndDate As Date | description= | newinversion=}} | ||
|- | |- | ||
− | | | + | |width=50%|{{Event | name=DragEvent | params=cEvent As CalendarEvent | description= | newinversion=}} |
− | + | ||
− | |{{Event | name= | + | |
− | + | ||
− | + | ||
|- | |- | ||
+ | |width=50%|{{Event | name=EditEvent | params=cEvent As CalendarEvent | description= | returntype=CalendarEvent | newinversion=}} | ||
|- | |- | ||
Line 30: | Line 31: | ||
|class=titleClass colspan=3|Properties | |class=titleClass colspan=3|Properties | ||
|- | |- | ||
− | |width=33%|{{Property | name=AdaptWeeksPerMonth | type=Boolean | description= | readonly=no | newinversion= | version=1. | + | |width=33%|{{Property | name=AdaptWeeksPerMonth | type=Boolean | description= | readonly=no | newinversion= | version=1.4.1}} |
− | |width=33%|{{Property | name=FirstDate | type=Date | description= | readonly=yes | newinversion= | version=1. | + | |width=33%|{{Property | name=FirstDate | type=Date | description= | readonly=yes | newinversion= | version=1.4.1}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=ScrollPosition | type=Double | description= | readonly=no | newinversion= | version=1.4.1}} |
|- | |- | ||
− | |width=33%|{{Property | name=Animate | type=Boolean | description= | readonly=no | newinversion=1.1.0 | version=1. | + | |width=33%|{{Property | name=Animate | type=Boolean | description= | readonly=no | newinversion=1.1.0 | version=1.4.1}} |
− | |width=33%|{{Property | name=FirstDayOfWeek | type=Byte | description= | readonly=no | newinversion= | version=1. | + | |width=33%|{{Property | name=FirstDayOfWeek | type=Byte | description= | readonly=no | newinversion= | version=1.4.1}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=SelEnd | type=Date | description= | readonly=no | newinversion=1.1.0 | version=1.4.1}} |
|- | |- | ||
− | |width=33%|{{Property | name=Border | type=Boolean | description= | readonly=no | newinversion= | version=1. | + | |width=33%|{{Property | name=Border | type=Boolean | description= | readonly=no | newinversion= | version=1.4.1}} |
− | |width=33%|{{Property | name=ForceAM_PM | type=Boolean | description= | readonly=no | newinversion=1.1.0 | version=1. | + | |width=33%|{{Property | name=ForceAM_PM | type=Boolean | description= | readonly=no | newinversion=1.1.0 | version=1.4.1}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=SelStart | type=Date | description= | readonly=no | newinversion=1.1.0 | version=1.4.1}} |
|- | |- | ||
− | |width=33%|{{Property | name=ColorWeekend | type=Boolean | description= | readonly=no | newinversion= | version=1. | + | |width=33%|{{Property | name=ColorWeekend | type=Boolean | description= | readonly=no | newinversion= | version=1.4.1}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=Freeze | type=Boolean | description= | readonly=no | newinversion= | version=1.4.1}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=Style | type=Integer | description= | readonly=yes | newinversion= | version=1.4.1}} |
|- | |- | ||
− | |width=33%|{{Property | name=CreateWithDrag | type=Boolean | description= | readonly=no | newinversion= | version=1. | + | |width=33%|{{Property | name=CreateWithDrag | type=Boolean | description= | readonly=no | newinversion= | version=1.4.1}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=HelpTagFormat | type=String | description= | readonly=no | newinversion=1.2.0 | version=1.4.1}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=TextFont | type=String | description= | readonly=no | newinversion=1.2.1 | version=1.4.1}} |
|- | |- | ||
− | |width=33%|{{Property | name=DayEndHour | type=Single | description= | readonly=no | newinversion=1.1.0 | version=1. | + | |width=33%|{{Property | name=DayEndHour | type=Single | description= | readonly=no | newinversion=1.1.0 | version=1.4.1}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=HiDPI | type=Boolean | description= | readonly=yes | newinversion= | version=1.4.1}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=TransparentBackground | type=Boolean | description= | readonly=no | newinversion=1.4.1 | version=1.4.1}} |
|- | |- | ||
− | |width=33%|{{Property | name=DayEventsHeight | type=Integer | description= | readonly=no | newinversion=1.2.0 | version=1. | + | |width=33%|{{Property | name=DayEventsHeight | type=Integer | description= | readonly=no | newinversion=1.2.0 | version=1.4.1}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=LastDate | type=Date | description= | readonly=yes | newinversion= | version=1.4.1}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=ViewDays | type=Integer | description= | readonly=no | newinversion= | version=1.4.1}} |
|- | |- | ||
− | |width=33%|{{Property | name=DayNames | type=String | description= | readonly=no | newinversion= | version=1. | + | |width=33%|{{Property | name=DayNames | type=String | description= | readonly=no | newinversion= | version=1.4.1}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=LockDayEventsHeight | type=Boolean | description= | readonly=no | newinversion=1.2.0 | version=1.4.1}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=ViewType | type=Integer | description= | readonly=no | newinversion= | version=1.4.1}} |
|- | |- | ||
− | |width=33%|{{Property | name=DayStartHour | type=Single | description= | readonly=no | newinversion=1.1.0 | version=1. | + | |width=33%|{{Property | name=DayStartHour | type=Single | description= | readonly=no | newinversion=1.1.0 | version=1.4.1}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=minHGap | type=Integer | description= | readonly=no | newinversion= | version=1.4.1}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=WeekHeaderTextFormat | type=String | description= | readonly=no | newinversion=1.1.0 | version=1.4.1}} |
|- | |- | ||
− | |width=33%|{{Property | name=DisplayDate | type=Date | description= | readonly=no | newinversion= | version=1. | + | |width=33%|{{Property | name=DisableScroll | type=Boolean | description= | readonly=no | newinversion=1.2.1 | version=1.4.1}} |
− | |width=33%|{{Property | name=minVGap | type=Integer | description= | readonly=no | newinversion= | version=1. | + | |width=33%|{{Property | name=minHourHeight | type=Integer | description= | readonly=no | newinversion= | version=1.4.1}} |
+ | |width=33%|{{Property | name=YearHeatMap | type=Boolean | description= | readonly=no | newinversion= | version=1.4.1}} | ||
+ | |- | ||
+ | |width=33%|{{Property | name=DisplayDate | type=Date | description= | readonly=no | newinversion= | version=1.4.1}} | ||
+ | |width=33%|{{Property | name=minVGap | type=Integer | description= | readonly=no | newinversion= | version=1.4.1}} | ||
+ | |width=33%|{{Property | name=YearMultipleEvents | type=Boolean | description= | readonly=no | newinversion= | version=1.4.1}} | ||
+ | |- | ||
+ | |width=33%|{{Property | name=DisplayWeeknumber | type=Boolean | description= | readonly=no | newinversion= | version=1.4.1}} | ||
+ | |width=33%|{{Property | name=MonthNames | type=String | description= | readonly=no | newinversion= | version=1.4.1}} | ||
|- | |- | ||
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=DragEvents | type=Boolean | description= | readonly=no | newinversion= | version=1.4.1}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=MyColors | type=Colors | description= | readonly=no | newinversion= | version=1.4.1}} |
|- | |- | ||
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=FilterEvents | type=Boolean | description= | readonly=no | newinversion=1.4.0 | version=1.4.1}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=MyStyle | type=Styles | description= | readonly=no | newinversion= | version=1.4.1}} |
|- | |- | ||
Line 84: | Line 93: | ||
{| class=methodTable | {| class=methodTable | ||
|- | |- | ||
− | |class=titleClass colspan= | + | |class=titleClass colspan=3|Methods |
|- | |- | ||
− | |width= | + | |width=33%|{{Method | name=AddEvent | params=cEvent As CalendarEvent | description= | newinversion=}} |
− | |width= | + | |width=33%|{{Method | name=ImportFromDB | params=RS As RecordSet, ID As String = "ID", StartDate As String = "Start", EndDate As String = "End", Title As String = "Title", EventColor As String = "Color", Location As String = "Location", Description As String = "Description", Editable As Boolean = True, AllDay As Boolean = False | description= | returntype=Boolean | newinversion=}} |
+ | |width=33%|{{Method | name=Scroll | params=deltaX As Integer, deltaY As Integer = 0 | description= | newinversion=}} | ||
|- | |- | ||
− | |width= | + | |width=33%|{{Method | name=DateForXY | params=x As Integer, y As Integer | description= | returntype=Date | newinversion=1.2.1}} |
− | |width= | + | |width=33%|{{Method | name=ImportICS | params=f As FolderItem, DefaultColor As Color = &c4986E7, Editable As Boolean = False | description= | newinversion=}} |
+ | |width=33%|{{Method | name=Search | params=txt As String, setFocus As Boolean = True, FromBeginning As Boolean = False | description= | returntype=CalendarEvent | newinversion=1.4.0}} | ||
|- | |- | ||
− | |width= | + | |width=33%|{{Method | name=DeleteAllEvents | description= | newinversion=}} |
− | |width= | + | |width=33%|{{Method | name=ImportICS | params=txt As String, DefaultColor As Color = &c4986E7, Editable As Boolean = False | description= | newinversion=}} |
+ | |width=33%|{{Method | name=SetStyle | params=StyleType As Integer | description= | newinversion=}} | ||
|- | |- | ||
− | |width= | + | |width=33%|{{Method | name=ExportICS | description= | returntype=String | newinversion=}} |
− | |width= | + | |width=33%|{{Method | name=PrintAdvanced | params=g As Graphics, PrintToday As Boolean = False | description= | newinversion=}} |
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
− | |width= | + | |width=33%|{{Method | name=ExportToDB | params=DB As Database, TableName As String, ID As String = "ID", StartDate As String = "Start", EndDate As String = "End", Title As String = "Title", EventColor As String = "Color", Location As String = "Location", Description As String = "Description" | description= | returntype=Boolean | newinversion=}} |
+ | |width=33%|{{Method | name=PrintSimple | params=PrintToday As Boolean = False | description= | newinversion=}} | ||
|- | |- | ||
− | |width= | + | |width=33%|{{Method | name=FocusOn | params=cEvent As CalendarEvent | description= | newinversion=1.4.0}} |
+ | |width=33%|{{Method | name=Redisplay | description= | newinversion=}} | ||
|- | |- | ||
+ | |width=33%|{{Method | name=GetEvents | description= | returntype=CalendarEvent() | newinversion=}} | ||
+ | |width=33%|{{Method | name=RemoveEvent | params=cEvent As CalendarEvent, RemoveFromDB As Boolean = True | description= | newinversion=}} | ||
|} | |} | ||
Line 140: | Line 154: | ||
|- | |- | ||
|StyleDark | |StyleDark | ||
− | |A dark | + | |A dark style (black, grey and green). |
|- | |- | ||
|StyleOutlook2010 | |StyleOutlook2010 | ||
|Office Outlook 2010 style. | |Office Outlook 2010 style. | ||
+ | |- | ||
+ | |StyleOutlook2013 | ||
+ | |Office Outlook 2013 (beta) style. | ||
|} | |} | ||
Line 171: | Line 188: | ||
|Use the [[CalendarView.ViewDays|ViewDays]] property to set the amount of days to display. If ViewDays=5 days from Monday to Friday are displayed. | |Use the [[CalendarView.ViewDays|ViewDays]] property to set the amount of days to display. If ViewDays=5 days from Monday to Friday are displayed. | ||
|} | |} | ||
+ | |||
==History== | ==History== | ||
+ | Read on [[CalendarView.History|History page]] | ||
− | === | + | ==See Also== |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | [[CalendarEvent]] | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | |||
− | |||
==External Links== | ==External Links== | ||
Download page: | Download page: | ||
− | http://www.jeremieleroy.com/products.php | + | http://www.jeremieleroy.com/products.php |
Latest revision as of 13:20, 6 August 2015
Displays a Calendar in several formats (Year, Month, Week, Day, ...) that presents CalendarEvents.
This custom control based on a Canvas is similar to iCal on Mac OS and Google Calendar.
Events | |
CalendarEventFilter | NewEvent |
ConstructContextualMenu | Open |
DateSelected | ShowHelptag |
DoubleClick | ViewChange |
DragEvent | |
EditEvent |
Methods | ||
AddEvent | ImportFromDB | Scroll |
DateForXY | ImportICS | Search |
DeleteAllEvents | ImportICS | SetStyle |
ExportICS | PrintAdvanced | |
ExportToDB | PrintSimple | |
FocusOn | Redisplay | |
GetEvents | RemoveEvent |
Shared Methods |
Register |
Class Constants
Style
The following class constants are to be used to specify the Style to use with SetStyle function.
Class Constant | Description |
---|---|
StyleDefault | The default style. |
StyleICal | Macintosh iCal style. |
StyleGoogle | Google Calendar style. |
StyleDark | A dark style (black, grey and green). |
StyleOutlook2010 | Office Outlook 2010 style. |
StyleOutlook2013 | Office Outlook 2013 (beta) style. |
ViewType
The following class constants are to be used with the ViewType property.
Class Constant | Description |
---|---|
TypePicker | Displays a DatePicker. |
TypeYear | Displays a whole year. |
TypeMonth | Displays a Month calendar. |
TypeWeek | Displays a full week. |
TypeDay | Displays one day. |
TypeOther | Use the ViewDays property to set the amount of days to display. If ViewDays=5 days from Monday to Friday are displayed. |
History
Read on History page
See Also
External Links
Download page: http://www.jeremieleroy.com/products.php