Print Page | Close Window

Track Control

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=19414
Printed Date: 05 October 2024 at 2:20am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Track Control
Posted By: wsun
Subject: Track Control
Date Posted: 17 January 2012 at 3:52am
Hi,
Can anyone help to solve my problem?



Thank for help.



Replies:
Posted By: Xander75
Date Posted: 18 January 2012 at 3:52am
Hi,

I believe this can only be done in v15.1.3 and forward (possibly one of the of the builds before v15.1.3) from what I remember but it's simple to do.

When setting up the TrackControl add:
'Manually set TimeLine Step:
.PaintManager.TimeLineStep = 1
.PaintManager.TimeLineStepAuto = False
   
'Allow Format TimeLine Label
.PaintManager.CustomTimeLineLabel = True

Then using the TrackControl_TimeLineLabel event you can change the Label, TickColor & TickLength fields.

PS. You format "Label" with the date format you need to display.


-------------
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: diegosoftlord
Date Posted: 24 May 2012 at 9:19am
Hello ! i'm new in the Post.- 

          You can show some example for change the label time with date format.- 
In the event TimeLineLabel.- Because i Could not get it yet .-

          Thank You Very Much 


-------------
Diego Ramos


Posted By: wsun
Date Posted: 11 June 2012 at 5:21am
hi,
diegosoftlord. You can try this.
Dim dtDate As Date

Private Sub Form_Load()
    dtDate = "28/01/2012"
End Sub

Private Sub TrackControl_TimeLineLabel(ByVal Position As Long, Label As String, TickColor As stdole.OLE_COLOR, TickLength As Long)
    Select Case Position
        Case 0
            Label = Format(dtDate, "mmm yy")
            TickColor = &H2C94FD
            TickLength = 12
        Case Else
            Dim dtNextDate As Date
            Dim pos As String
            pos = Position / 24
           
            If InStr(pos, ".") = 0 Then
                dtNextDate = DateAdd("d", CDbl(pos), dtDate)
                Label = Format(dtNextDate, "dd/mm/yyyy")
                TickColor = &HFF&   '&H2C94FD
                TickLength = 14
            Else
                Label = ""
                TickLength = 0
            End If
    End Select
End Sub



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