Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - DayView starting with current time
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

DayView starting with current time

 Post Reply Post Reply
Author
Message
StefanNbg View Drop Down
Groupie
Groupie


Joined: 16 July 2009
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote StefanNbg Quote  Post ReplyReply Direct Link To This Post Topic: DayView starting with current time
    Posted: 01 October 2010 at 2:06am
Problem:

In DayView I can see events starting 8 AM until 1 PM.

But if current time is perhaps 11:30 AM is still can see events from 8 AM until 1 PM, but I need to see now the events from current time until end. How can I scroll the DayView so that I see events starting from current time?

Or is there a property that this happens automatically ?

Stefan
FB_Addon_TelNo{ height:15px !important; white-space: nowrap !important; background-color: #0ff0ff;}
Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Posted: 19 October 2010 at 10:01am
Hi StefanNbg,

I am unsure if you can scroll to the current time automatically with a specific event, however you could create your own CalendarScrollTo event using the following code:


    CalendarControl.DayView.ScrollV (CellIndex)    ' CellIndex being the cell number of the current time.
    CalendarControl.Populate   


So for example if your CalendarControl.DayView.TimeScale is 60 ie. hourly & the current time is 11:30am then you would write "CalendarControl.DayView.ScrollV (12)"

If for example if your CalendarControl.DayView.TimeScale is 30 ie. half hourly & the current time is 11:30am then you would write "CalendarControl.DayView.ScrollV (24)"

Obviously you will need to get the current time and work out which cell you should scroll to based on the TimeScale of the CalendarControl. I hope this helps.
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)
Back to Top
StefanNbg View Drop Down
Groupie
Groupie


Joined: 16 July 2009
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote StefanNbg Quote  Post ReplyReply Direct Link To This Post Posted: 19 October 2010 at 10:44am
I've solved the problem myself:

calendar.OBJECT.Options.WorkDayStartTime = DATETIME() - 3600
Calendar.DayView.ScrollToWorkDayBegin()
calendar.OBJECT.Options.WorkDayStartTime = CTOT('30.12.1899 '+'08:00')

first change WorkDayStartTime to actual time minus f.e. 1 hour, the say ScrollToWorkDayBegin and finaly set WorkDayStartTime back to original time.

This is a workarround, but an event for that would be better than this workarround...
FB_Addon_TelNo{ height:15px !important; white-space: nowrap !important; background-color: #0ff0ff;}
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.