[B4X] [XUI] [Old] AS CalendarAdvanced ? - OneRow/FiveRow Calendar - Expand and Collapse [Payware]

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 2.12
    • Add set HeaderColor
    • Add set BodyColor - the complete calendar is rebuilt at the action
    • Add set BottomColor
    • Add set OtherMonthBackgroundColor - the complete calendar is rebuilt at the action
Example:
B4X:
ASCalendarAdvanced1.HeaderColor = xui.Color_Blue
ASCalendarAdvanced1.BodyColor = xui.Color_Blue
ASCalendarAdvanced1.BottomColor = xui.Color_Blue
ASCalendarAdvanced1.OtherMonthBackgroundColor = xui.Color_Red
 

imbault

Well-Known Member
Licensed User
Longtime User
Dear Alexander,

How to have Month name and year on the top of the calendar, is this a property?

Thanks

Patrick
 

Alexander Stolte

Expert
Licensed User
Longtime User
How to have Month name and year on the top of the calendar, is this a property?
no, it's just a label above the view.
"xbblbl_current_month" is this label.
In this case it is a BBCodeLabel.
B4X:
Private Sub ASCalendarAdvanced1_VisibleRangeChange(StartDate As Long,EndDate As Long)

    Dim p As Period
    p.Days = 8
   
    xbblbl_current_month.Text = $"[b]${DateUtils.GetMonthName(DateUtils.AddPeriod(StartDate,p))} [color=#2D8879]${DateTime.GetYear(DateUtils.AddPeriod(StartDate,p))}[/color][/b]"$
End Sub
 

imbault

Well-Known Member
Licensed User
Longtime User
Dear Alexander,

Can you please send me code project of :



Thanks

Patrick
 

Alexander Stolte

Expert
Licensed User
Longtime User
Can you please send me code project of
No, because this is a image from the internet as inspiration.
The code here is from a project of mine.
 

Alexander Stolte

Expert
Licensed User
Longtime User
but I don't find the event VisibleRangeChange of ASCalendarAdvanced in order to put your code...
Open the Designer -> Right Click on the ASCalendarAdvanced View on the form -> Events -> VisibleRangeChange
 

imbault

Well-Known Member
Licensed User
Longtime User
No, because this is a image from the internet as inspiration.

The code here is from a project of mine.
Dear Alexander,

Using B4A V11, jdk1.8.0_291, your ASCalendarAdvanced V2.12

With this code :
B4X:
    ASCalendarAdvanced1.ExtraInfosTextProperties.TextFont = xui.CreateDefaultFont(8)
  
    ASCalendarAdvanced1.WeekNameShort = ASCalendarAdvanced1.CreateASCalendarAdvanced_WeekNameShort("Lun","Mar","Mer","Jeu","Ven","Sam","Dim")
    ASCalendarAdvanced1.MonthNameShort = ASCalendarAdvanced1.CreateASCalendarAdvanced_MonthNameShort("Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sept","Oct","Nov","Déc")


    ASCalendarAdvanced1.ShowOtherMonths =False
    ASCalendarAdvanced1.UpdateBody
    ASCalendarAdvanced1.UpdateHeader

    ASCalendarAdvanced1.ShowFirstWeekOfMonthInFirstRow = True

  
    Dim p_1 As Period : p_1.Months = -1
    Dim p_2 As Period : p_2.Months = 1
    ASCalendarAdvanced1.SetLimitRange(DateUtils.AddPeriod(DateTime.Now,p_1),DateUtils.AddPeriod(DateTime.Now,p_2))
  
  
    ASCalendarAdvanced1.CreateCalendar

This Event VisibleRangeChange is never fired, I've debugged it then I've put logs in it.... nothing...
B4X:
Private Sub ASCalendarAdvanced1_VisibleRangeChange(StartDate As Long,EndDate As Long)

    Log(" ASCalendarAdvanced1_VisibleRangeChange Event")
    Dim p As Period
    p.Days = 8
 
    xbblbl_current_month.Text = $"[b]${DateUtils.GetMonthName(DateUtils.AddPeriod(StartDate,p))} [color=#2D8879]${DateTime.GetYear(DateUtils.AddPeriod(StartDate,p))}[/color][/b]"$
End Sub

Help would be appreciated cause the month name in the calendar is very small
 

Alexander Stolte

Expert
Licensed User
Longtime User
The IDE helps you, look at the library tab, there is a column version and online version, if the online version bold, then there is a newer version available.
 

Wien.Mart

Member
Licensed User
Longtime User
Hello, may I know if the calendar can handle scheduling for two or more people and have a recurring task on the schedule? Thanks in advance.
 

Alexander Stolte

Expert
Licensed User
Longtime User
Hello, may I know if the calendar can handle scheduling for two or more people and have a recurring task on the schedule? Thanks in advance.
The calendar can do what you see and read. What you make of it is up to you. By design, it is only a viewer.
 

focus330

Member
Licensed User
Longtime User
Very usefull. I like.

Only a question: Is it possible to have the text of the 'Appointmentype2' under the day and not over ? I trued something with AppointmentType2_Itemproprieties without success.
Thanks
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 2.14
    • Add AppointmentType1BottomAppointmentTyp2Top - If false then AppointmentType1 is on Top and Type2 is on the bottom
Only a question: Is it possible to have the text of the 'Appointmentype2' under the day and not over ? I trued something with AppointmentType2_Itemproprieties without success.
set AppointmentType1BottomAppointmentTyp2Top to false
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…