how to color events - CalendarEventLabel.color ??? |
Post Reply |
Author | |
Jaymeister
Groupie Joined: 27 April 2009 Status: Offline Points: 32 |
Post Options
Thanks(0)
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 |
|
Jaymeister
Groupie Joined: 27 April 2009 Status: Offline Points: 32 |
Post Options
Thanks(0)
|
The above code is VB6 on XP using demo calendar control
|
|
axdoverm
Groupie Joined: 16 August 2008 Location: Netherlands Status: Offline Points: 14 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |