Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - SOLVED: CalendarEventCategory
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SOLVED: CalendarEventCategory

 Post Reply Post Reply
Author
Message
McKloony View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 January 2007
Location: Germany
Status: Offline
Points: 340
Post Options Post Options   Thanks (0) Thanks(0)   Quote McKloony Quote  Post ReplyReply Direct Link To This Post Topic: SOLVED: CalendarEventCategory
    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
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
McKloony View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 January 2007
Location: Germany
Status: Offline
Points: 340
Post Options Post Options   Thanks (0) Thanks(0)   Quote McKloony Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 14 March 2011 at 8:44am
The first part of the code I posted shows
Back to Top
McKloony View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 January 2007
Location: Germany
Status: Offline
Points: 340
Post Options Post Options   Thanks (0) Thanks(0)   Quote McKloony Quote  Post ReplyReply Direct Link To This Post 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
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.156 seconds.