Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Max All Day Events
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Max All Day Events

 Post Reply Post Reply
Author
Message
Matt View Drop Down
Newbie
Newbie


Joined: 21 January 2006
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Matt Quote  Post ReplyReply Direct Link To This Post Topic: Max All Day Events
    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
 
 
 
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Matt View Drop Down
Newbie
Newbie


Joined: 21 January 2006
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Matt Quote  Post ReplyReply Direct Link To This Post Posted: 31 August 2006 at 3:02pm
Serge -
 
 
THANKS!
 
Matt
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.