Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - How to position in Timeline TrackControl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to position in Timeline TrackControl

 Post Reply Post Reply
Author
Message Reverse Sort Order
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: How to position in Timeline TrackControl
    Posted: 02 May 2012 at 2:19am
Thx a lot, that's it Smile
CJ ActiveX 15.2.1/15.3.1
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: 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)
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: 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
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.094 seconds.