Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - how to color events - CalendarEventLabel.color ???
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

how to color events - CalendarEventLabel.color ???

 Post Reply Post Reply
Author
Message Reverse Sort Order
axdoverm View Drop Down
Groupie
Groupie
Avatar

Joined: 16 August 2008
Location: Netherlands
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote axdoverm Quote  Post ReplyReply Direct Link To This Post Topic: how to color events - CalendarEventLabel.color ???
    Posted: 11 August 2010 at 4:01am

I have the same problem. When i looking at your code it's almost the same like my code. Do you already have a solution for your problem? Because its driving me already crazy for a few days now :)

Product: Xtreme SuitePro (ActiveX) version 11.2.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0
Back to Top
Jaymeister View Drop Down
Groupie
Groupie
Avatar

Joined: 27 April 2009
Status: Offline
Points: 32
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jaymeister Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2009 at 7:29am
The above code is VB6 on XP using demo calendar control
Back to Top
Jaymeister View Drop Down
Groupie
Groupie
Avatar

Joined: 27 April 2009
Status: Offline
Points: 32
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jaymeister Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 2009 at 10:46am
I'm trying to color events - was hoping it to be as easy as...

  Dim TimeObject As CalendarEvent
  Set TimeObject = CalendarCtrl2Use.DataProvider.CreateEvent
  TimeObject.backcolor = rgb(255,200,200)

searched for and found "CalendarEventLabel" stuff
I see the CalendarEventLabel.color property
just cannot get it to work in my VB6 sub

Sub NewTimeObject(CalendarCtrl2Use As CalendarControl, ByVal UniqueID$, StartYYYYMMDD$, StopYYYYMMDD$, StartHHMM$, StopHHMM$, Title$, Color2Use&, Optional RefreshCalendar%)
  Dim TimeObject As CalendarEvent, Recurrence As CalendarRecurrencePattern
  Set TimeObject = CalendarCtrl2Use.DataProvider.CreateEvent

  TimeObject.ScheduleID = UniqueID$
  TimeObject.Subject = Title$
  TimeObject.StartTime = YYYYMMDD2Format$(StartYYYYMMDD$, "dd Mmm yyyy") + "   " + Left$(StartHHMM$, 2) + ":" + Right$(StartHHMM$, 2)
  TimeObject.EndTime = YYYYMMDD2Format$(StopYYYYMMDD$, "dd Mmm yyyy") + "   " + Left$(StopHHMM$, 2) + ":" + Right$(StopHHMM$, 2)
  'TimeObject.Label = Color2Use&
 
  Dim pLabel As CalendarEventLabel
  'Set pLabel = frmMain.CalendarControl.DataProvider.???  how do I tell color to apply to TimeObject ???
  pLabel.Color = RGB(255, 200, 200)
 
  CalendarCtrl2Use.DataProvider.AddEvent TimeObject
  If RefreshCalendar% Then CalendarCtrl2Use.Populate
 
  'TimeObject.Id UniqueID$
  'TimeObject.Categories.Add "Category A"
  'TimeObject.CreationTime
  'TimeObject.CustomIcons.Add "?"
  'TimeObject.CustomProperties
  'TimeObject.DataProvider
  'TimeObject.LastModificationTime
  'TimeObject.RecurrencePattern
  'TimeObject.RecurrenceState
  'TimeObject.ReminderMinutesBeforeStart
  'TimeObject.ReminderSoundFile
End Sub

Help
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 1.016 seconds.