Print Page | Close Window

DayView starting with current time

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=17359
Printed Date: 06 October 2024 at 9:11am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: DayView starting with current time
Posted By: StefanNbg
Subject: DayView starting with current time
Date 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;}



Replies:
Posted By: Xander75
Date 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)


Posted By: StefanNbg
Date 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;}



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net