Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - EnsureVisible a CalendarEvent
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

EnsureVisible a CalendarEvent

 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: EnsureVisible a CalendarEvent
    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
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: 15 September 2011 at 3:29pm
did you try Calendar.ActiveView.SelectViewEvent?
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: 16 September 2011 at 7:38am
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
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: 17 September 2011 at 4:33am
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
Back to Top
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2011 at 8:29am
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
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.125 seconds.