B4A Library Custom Calendar Class

Hi,
This is my first contribution to B4A.
It's a very simple calendar clickable.

Instructions are :

Initialize(Callback, EventName, Width (same declare as addview), Height (idem), date (DateTimeFormat) )

ShowCalendar(Boolean)
LengthMonth(Year, Month) As Int
SetTableColor(Color) : color of the grid
SetBackGroundColor(Color) : color of the Background
SetActiveButtonColor(Color) : color of calendar's buttons
SetInactiveButtonColor(Color) : color of day's buttons
SetFunctionButtonColor(Color) : color of PrevMonth, NextMonth, Years Buttons
SetTextSize(value) : relative Size for Texts

NmFullday(0..6) : name each days
Nmday(0..6) : name (on 3 letters) for days
NmFullMonth(0..12) :name each months
NmMonth(0..11) : name (on 3 letters) for months
(theses tables are in French actually)
 

Attachments

  • CustomCalendarExemple.zip
    4.6 KB · Views: 1,043
  • customcal.jpg
    customcal.jpg
    24 KB · Views: 1,648
Last edited:

padvou

Active Member
Licensed User
Longtime User
Could this class be extended to show also a week view with columns of weekdays (each row being half-hour interval) and day view? (something like an outlook calendar, maybe...)
 

imbault

Well-Known Member
Licensed User
Longtime User
Does someone worked on this Calendar class in order to add events (appointement, day off, metting...) in it, when you click on a event, you'll get the event information??
Thank
 

asales

Expert
Licensed User
Longtime User
Does someone worked on this Calendar class in order to add events (appointement, day off, metting...) in it, when you click on a event, you'll get the event information??
Thank
I made some changes in this class to display days of a list in different color.
The changes were marked with this text: "* * * NEW 02/08/2015".
 

Attachments

  • CustomCal4.zip
    15.4 KB · Views: 352

psdos

Active Member
Licensed User
Longtime User
I made some changes in this class to display days of a list in different color.
The changes were marked with this text: "* * * NEW 02/08/2015".

I to see two errors in you code, the first is in Main program add this at Activity_create

B4X:
Local.Initialize

and the other fail is in Custom_Calendar class, add this

B4X:
Public Sub Initialize(vCallback As Object, vEventName As String, Ww As Int, Hh As Int, BeginDate As Long, ld As List)    '* * * NEW 02/08/2015

the variable 'Wv' is not declared, and some variable more not declared in class
 

Attachments

  • CustomCal4.zip
    423.3 KB · Views: 360
Last edited:

asales

Expert
Licensed User
Longtime User
I to see two errors in you code, the first is in Main program add this at Activity_create

B4X:
Local.Initialize

and the other fail is in Custom_Calendar class, add this

B4X:
Public Sub Initialize(vCallback As Object, vEventName As String, Ww As Int, Hh As Int, BeginDate As Long, ld As List)    '* * * NEW 02/08/2015

the variable 'Wv' is not declared, and some variable more not declared in class

Cool. Thanks.
 

Declan

Well-Known Member
Licensed User
Longtime User
I have modified this example, but have serious layout issues.
I am using two devices:
7" Tablet
4" ZTE Phone
The 7" tablet layout is great, but the 4" phone layout does not show the Months nor the Days.
I have attached the two screenshots and also the code.
Could anyone please assist.
 

Attachments

  • Tablet-7inch.png
    Tablet-7inch.png
    19.5 KB · Views: 380
  • ZTE-4inch.png
    ZTE-4inch.png
    28 KB · Views: 369
  • Calendar_Test.zip
    13.8 KB · Views: 302
Top