![]() |
EnsureVisible a CalendarEvent |
Post Reply ![]() |
Author | |
McKloony ![]() Senior Member ![]() ![]() Joined: 09 January 2007 Location: Germany Status: Offline Points: 340 |
![]() ![]() ![]() ![]() ![]() Posted: 10 August 2011 at 7:01am |
How can I EnsureVisible a CalendarEvent. If I add a new CalendarEvent, that is one or two weeks in the future, i want to see this immediately after adding.
|
|
Product: Xtreme SuitePro (ActiveX) 16.2.5
Platform: XP / Windows 7 Language: Visual Basic 6.0 SP6 |
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
did you try Calendar.ActiveView.SelectViewEvent?
|
|
![]() |
|
McKloony ![]() Senior Member ![]() ![]() Joined: 09 January 2007 Location: Germany Status: Offline Points: 340 |
![]() ![]() ![]() ![]() ![]() |
Yes I tried, but presumably I have the wrong syntax.
I dont know how to get a CalendarViewEvent from an CalendarEvent? |
|
Product: Xtreme SuitePro (ActiveX) 16.2.5
Platform: XP / Windows 7 Language: Visual Basic 6.0 SP6 |
|
![]() |
|
McKloony ![]() Senior Member ![]() ![]() Joined: 09 January 2007 Location: Germany Status: Offline Points: 340 |
![]() ![]() ![]() ![]() ![]() |
Calendar.ActiveView.SelectViewEvent needs a CalendarViewEvent Object. I only have a CalendarEvent Object in my function.
|
|
Product: Xtreme SuitePro (ActiveX) 16.2.5
Platform: XP / Windows 7 Language: Visual Basic 6.0 SP6 |
|
![]() |
|
Fabian ![]() Senior Member ![]() ![]() Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
![]() ![]() ![]() ![]() ![]() |
Hi McKloony
That's my solution (TERID is the appointments data base ID stored as proprty in each event):
For j = 0 To CalendarControl1.ActiveView.DaysCount - 1
For k = 0 To CalendarControl1.ActiveView.Days(j).ViewGroups.Count - 1 For l = 0 To CalendarControl1.ActiveView.Days(j).ViewGroups(k).ViewEvents.Count - 1 If CalendarControl1.ActiveView.Days(j).ViewGroups(k).ViewEvents(l).Event.CustomProperties.Property("TERID") = TERID Then Call CalendarControl1.DayView.EnsureVisible(CalendarControl1.ActiveView.Days(j).ViewGroups(k).ViewEvents(l)) Call CalendarControl1.ActiveView.SelectViewEvent(CalendarControl1.ActiveView.Days(j).ViewGroups(k).ViewEvents(l), True) CalendarControl1.Populate Exit For End If Next l Next k
Next j Hope that helps
Fabian
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.3
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 / SP6 |
|
![]() |
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 |