Print Page | Close Window

Suggestion: Add the ability to display holidays

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=18462
Printed Date: 08 July 2024 at 1:27pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Suggestion: Add the ability to display holidays
Posted By: PeterG
Subject: Suggestion: Add the ability to display holidays
Date Posted: 28 May 2011 at 5:01pm
I want to be able to display holidays on a calendar with multiple schedules.  The only way I can do it now is to add all-day events to at least one of the schedules.  This is okay but it would be cleaner if I could just add some text to the calendar caption bar or modify the Date Label displayed.  I can't find a way to do either of these in the current implementation.

How have other people handled holidays?


-------------
Product: ActiveX PropertyGrid Version 15.0.2
Product: ActiveX Calendar Version 15.0.2
Platform: Windows Vista Business (32bit)
Language: Clarion 7.3



Replies:
Posted By: Fabian
Date Posted: 01 June 2011 at 2:02am
Hi PeterG,
 
Probably helps you this snippet (for V15.x)
 
Private Sub CalendarControl1_GetItemText(ByVal ItemParams As XtremeCalendarControl.CalendarGetItemTextParams)
  Dim h         As Holidays
  Dim CacheIdx  As Long
  Dim Ev        As CalendarEvent
   
 If ItemParams.Item = xtpCalendarItemText_DayViewDayHeaderLeft Then
    h = WhatHoliday(ItemParams.ViewDay.Date)
    If h <> Holidays.None Then
      ItemParams.Text = Format$(ItemParams.ViewDay.Date, "ddd, dd.mm.yy") + " (" + GetHolidayName(h) + ")"
    Else
      ItemParams.Text = Format$(ItemParams.ViewDay.Date, "ddd, dd.mm.yy")
    End If
  End If
 
  If ItemParams.Item = xtpCalendarItemText_DayViewDayHeaderCenter Or ItemParams.Item = xtpCalendarItemText_DayViewDayHeaderRight Then
    ItemParams.Text = ""
  End If
End Sub


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net