Print Page | Close Window

SOLVED: CalendarEventCategory

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=18036
Printed Date: 08 July 2024 at 4:35pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SOLVED: CalendarEventCategory
Posted By: McKloony
Subject: SOLVED: CalendarEventCategory
Date Posted: 11 March 2011 at 4:47am
How can I add a new CalendarEventCategory?

Dim DaPro As XtremeCalendarControl.CalendarDataProvider
Dim EvCat As XtremeCalendarControl.CalendarEventCategory
Dim EvCas As XtremeCalendarControl.CalendarEventCategories

Set FM = frmMain
Set CaCol = FM.calCont1
Set DaPro = CaCol.DataProvider
Set CaLbs = DaPro.LabelList
Set EvCas = DaPro.EventCategories

Set EvCat = EvCas.Add(1)

does not work Cry


-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6



Replies:
Posted By: SuperMario
Date Posted: 11 March 2011 at 10:20am
By default Event ID's 1-6 are already created yellow, blue, etc....  So if you add them be sure to start with ID 7 or greter or delete the default ones.
 
    If m_bAddEvent Then
        m_pEditingEvent.Categories.Add 7
        m_pEditingEvent.Categories.Add 8
        frmInbox.wndCalendarControl.DataProvider.AddEvent m_pEditingEvent
    Else
        frmInbox.wndCalendarControl.DataProvider.ChangeEvent m_pEditingEvent
    End If
 
Public Sub AddCategories()
'IDs 1-6 are used for the default colors, 1 = Yellow....6 - Blue

        Dim EvCat As XtremeCalendarControl.CalendarEventCategory
        Set EvCat = New CalendarEventCategory
        EvCat.Background = vbRed
        EvCat.BorderColor = vbGreen
        EvCat.Id = 1
        frmInbox.wndCalendarControl.DataProvider.EventCategories.Add EvCat
       
        Set EvCat = New CalendarEventCategory
        EvCat.Background = vbBlue
        EvCat.BorderColor = vbGreen
        EvCat.Id = 2
        frmInbox.wndCalendarControl.DataProvider.EventCategories.Add EvCat
       
        Set EvCat = New CalendarEventCategory
        EvCat.Background = vbYellow
        EvCat.BorderColor = vbGreen
        EvCat.Id = 3
        frmInbox.wndCalendarControl.DataProvider.EventCategories.Add EvCat
       
        Set EvCat = New CalendarEventCategory
        EvCat.Background = vbGreen
        EvCat.BorderColor = vbBlue
        EvCat.Id = 4
        frmInbox.wndCalendarControl.DataProvider.EventCategories.Add EvCat
End Sub



Posted By: McKloony
Date Posted: 12 March 2011 at 4:34am
Thank you verry much again!

How can I set an CalendarEventCategory to an CalendarEvent?




-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6


Posted By: SuperMario
Date Posted: 14 March 2011 at 8:44am
The first part of the code I posted shows


Posted By: McKloony
Date Posted: 14 March 2011 at 9:04am
Yes, sorry you are right !

-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

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