Print Page | Close Window

Max All Day Events

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=4904
Printed Date: 22 November 2024 at 3:33pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Max All Day Events
Posted By: Matt
Subject: Max All Day Events
Date Posted: 28 August 2006 at 1:17pm
Hello -
 
Can you offer any tips for how to handle a situation where the number of all day events exceeds the space available to display them in dayview mode?
 
Sorry if my question isn't clear.... basically my app centers around all day type events, and when switching into dayview mode, not all of them are being displayed, and I can't seem to find a way to scroll them.
 
Thanks
 
 
 



Replies:
Posted By: sserge
Date Posted: 30 August 2006 at 11:36am
Hi Matt,

You can use PrePopulate notification to organize AllDayEvents scrolling.
I've played with that by adding 2 buttons 'Up', 'Down' on my form.
Ther idea is following (as VB code):

Public g_nTopAllDayEvent As Long
 
Private Sub Form_Initialize()
    g_nTopAllDayEvent = 0
End Sub
Private Sub CalendarControl_PrePopulate( _
                ByVal ViewGroup As XtremeCalendarControl.CalendarViewGroup, _
                ByVal Events As XtremeCalendarControl.CalendarEvents)
   
    Dim i As Long
    Dim arIndexesToRemove As New Collection
    Dim pEvent As CalendarEvent
   
    For i = 0 To Events.Count - 1
        Set pEvent = Events(i)
       
        If pEvent.AllDayEvent And arIndexesToRemove.Count < g_nTopAllDayEvent Then
            arIndexesToRemove.Add i
        End If
    Next
   
    For i = arIndexesToRemove.Count To 1 Step -1
        Events.Remove arIndexesToRemove(i)
    Next
End Sub
 
Private Sub cmdADEDown_Click()
    g_nTopAllDayEvent = g_nTopAllDayEvent + 1
    CalendarControl.Populate
End Sub
 
Private Sub cmdADEUp_Click()
    If g_nTopAllDayEvent > 0 Then
        g_nTopAllDayEvent = g_nTopAllDayEvent - 1
        CalendarControl.Populate
    End If
End Sub


ps: we'll consider for future adding a property like DayViewAllDayEventsMaxHeightPercent which is now 50%.

--
WBR,
Serge


Posted By: Matt
Date Posted: 31 August 2006 at 3:02pm
Serge -
 
 
THANKS!
 
Matt



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