How to position in Timeline TrackControl
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=19654
Printed Date: 23 November 2024 at 5:26pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: How to position in Timeline TrackControl
Posted By: StefanNbg
Subject: How to position in Timeline TrackControl
Date Posted: 15 April 2012 at 5:25am
Hi, I hope anybody can help me. I have a TrackControl showing a calender of 2 Year beginniung f.e. 2012 til 2013 with all Months. Showing TrackControl it show me starting at Month Jan 2012,
but I wanna see the current month of date:
Is this possible and if, how can I do this?
thx a lot Stefan
|
Replies:
Posted By: Xander75
Date Posted: 30 April 2012 at 8:51am
Hi,
I lifted this from the samples Horizontal Scroll event:
Dim nPage As Integer nPage = (TrackControl.ViewPortMax - TrackControl.ViewPortMin) TrackControl.ViewPortMin = "106" ' <<< Input the number of where you want to scroll to. TrackControl.ViewPortMax = HScroll.Value + nPage
|
Enter a number in the TrackControl.ViewPortMin field and this will take you to the starting point you require. If we use your above example as a test then the 15th of April 2012 is the 106th day, this should then relate to the 106 position in the TrackControl.
You could then do this automatically by using DateDiff to calculate the number of days between todays date and the 1st of January 2012 after you have created your TrackControl interface.
------------- 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: 02 May 2012 at 2:19am
Thx a lot, that's it
------------- CJ ActiveX 15.2.1/15.3.1
|
|