Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - ScrollToWorkDayBegin don't work with TimeScale=60
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ScrollToWorkDayBegin don't work with TimeScale=60

 Post Reply Post Reply
Author
Message
GambaJo View Drop Down
Newbie
Newbie


Joined: 24 April 2013
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote GambaJo Quote  Post ReplyReply Direct Link To This Post Topic: ScrollToWorkDayBegin don't work with TimeScale=60
    Posted: 24 April 2013 at 8:32am
Product: Xtreme Suite Pro v15.1.3.0908
Platform: Windows XP Prof. 32Bit SP3
Language: Microsoft VB6

I have form with a codejock calendar control on it. In the Form_Load() Method of this form some propertys of this control are set.

I have a problem with the propertys "calendar.DayView.TimeScale", "calendar.options.WorkDayStartTime" and the method "calendar.DayView.ScrollToWorkDayBegin" in the dayview, weekview and workweekview.

When i set

calendar.DayView.TimeScale = 30
calendar.options.WorkDayStartTime = 08:00:00
calendar.DayView.ScrollToWorkDayBegin

then the calendar control scrolls the view so the view begins wiht 8 a.m.
So this is ok.

=================================================

When i set

calendar.DayView.TimeScale = 60
calendar.options.WorkDayStartTime = 08:00:00
calendar.DayView.ScrollToWorkDayBegin

then the calendar control scrolls the view so the view begins wiht 0 a.m. and not at 8 a.m.
Why?



Here is the code:
Private Sub Form_Load()
    On Error Resume Next
    m_blnChangeOptions = False
   
    'Merkmalsliste laden
    m_mkm.Mkm_MakeList Me, "AKTMKM"
    m_mkm.FormatMKMList LIS_MKM
    mkm Me, Nothing, 0, "AKTMKM", m_mkm.MKM_DEFAULT_VOR
   
    Set moLegalHolidays = New cLegalHolidays
   
    datePicker.AttachToCalendar calendar
   
    'FF-4008 - VHA
    datePicker.FirstWeekOfYearDays = 4      '1 = Starts on Jan 1 | 4 = First 4-day week | 7 = First full week
    '** WICHTIG: Wert-FirstWeekOfYearDays MUSS hier explizit gesetzt werden, damit die Kalenderwoche in der Druckvorschau stimmt
    '** Es ist verwunderlich, da FirstWeekOfYearDays vorher schon den Wert 4 besitzt
    '** Ist aber tatsächlich so!!! => mehrfach mit dp getestet
   
   
    'datePicker.TextTodayButton = g_Util.LanguagePack.TranslateString("Heute")
    datePicker.ShowNoneButton = False
    datePicker.ShowTodayButton = False
   
'    calendar.CaptionButtonTitle 0, g_Util.LanguagePack.TranslateString("Tag")
'    calendar.CaptionButtonTitle 1, g_Util.LanguagePack.TranslateString("Woche")
'    calendar.CaptionButtonTitle 2, g_Util.LanguagePack.TranslateString("Monat")
'    calendar.CaptionButtonTitle 4, g_Util.LanguagePack.TranslateString("Arbeitswoche")
'    calendar.CaptionButtonTitle 5, g_Util.LanguagePack.TranslateString("Volle Woche")
'    calendar.CaptionButtonTitle 6, g_Util.LanguagePack.TranslateString("Spaltenansicht")

   
   
    'ViewType
    Select Case Val(gBenutzer.CalendarOptions.ItemDefault("lngAnzahlTage", 5))
        Case 1
            calendar.ViewType = xtpCalendarDayView
            calendar.DayView.ShowDay Now, False
        Case 5
            calendar.ViewType = xtpCalendarWorkWeekView
            calendar.ShowMultiColumnsButton = False
        Case 7
            calendar.ViewType = xtpCalendarFullWeekView
            calendar.ShowMultiColumnsButton = True
        Case 30
            calendar.ViewType = xtpCalendarMonthView
    End Select
    calendar.DayView.TimeScale = Abs(gBenutzer.CalendarOptions.ItemDefault("strAufloesung", 30))
   
    calendar.options.WorkDayStartTime = TimeValue(gBenutzer.CalendarOptions.ItemDefault("timeStartzeit", TimeSerial(8, 0, 0)))
    calendar.options.WorkDayEndTime = TimeValue(gBenutzer.CalendarOptions.ItemDefault("timeEndZeit", TimeSerial(18, 0, 0)))
    calendar.options.WorkWeekMask = xtpCalendarDayMo_Fr
    calendar.DayView.ScrollToWorkDayBegin
    calendar.ShowTooltipForAllDayEvents = True
    calendar.options.DayViewTimeScaleShowMinutes = True
   
    If g_Util.IniGet("USERINTERFACE", "useToolBar", "0", Application.Folder & "\flowfact.ini") = "0" Then
        calendar.ShowCaptionBar = False
        datePicker.ShowTodayButton = False
    Else
        calendar.ShowCaptionBar = True
        datePicker.ShowTodayButton = True
    End If

    'calendar.VisualTheme = xtpCalendarThemeOffice2003

    'Globale Settings
    CalendarGlobalSettings.ResourceImages.LoadFromFile F_MAIN.m_oSkin.StylePath & "\CalendarStyle.dll", "Office2007Black.ini"
    'CalendarGlobalSettings.Office2007Images = F_MAIN.m_oSkin.StylePath & "\CalendarStyle.dll"
   
    CalendarGlobalSettings.Title = "FlowFact CRM"
    'Erledigt Icon laden
    Dim objThemeOfice2007 As CalendarThemeOffice2007
    Set objThemeOfice2007 = calendar.Theme

    If Not objThemeOfice2007 Is Nothing Then
        ' add custom icons with special IDs to use them instead of standard
        ' see also PrePopulate event handler
        objThemeOfice2007.CustomIcons.LoadIcon F_MAIN.m_oSkin.StylePath & "\icons\done.ico", ID_ICON_DONE, xtpImageNormal
        'objThemeOfice2007.CustomIcons.LoadBitmap F_MAIN.m_oSkin.StylePath & "\icons\done.bmp", ID_ICON_DONE, xtpImageNormal
    End If
    objThemeOfice2007.event.NORMAL.subject.Font.Bold = False
    objThemeOfice2007.event.Selected.subject.Font.Bold = False
    objThemeOfice2007.event.NORMAL.subject.Font.Size = 8
   
    'Mindesthöhe der Events
    calendar.Theme.DayView.event.HeightFormula.Divisor = 1
    calendar.Theme.DayView.event.HeightFormula.Multiplier = 1
    If calendar.DayView.TimeScale < 30 Then
        calendar.Theme.DayView.event.HeightFormula.Constant = 6
    Else
        calendar.Theme.DayView.event.HeightFormula.Constant = 18
    End If
    calendar.Theme.MonthView.event.HeightFormula.Divisor = 1
    calendar.Theme.MonthView.event.HeightFormula.Multiplier = 1
    calendar.Theme.MonthView.event.HeightFormula.Constant = 18
   
    'Optionen
    calendar.options.EnableAddNewTooltip = False
    calendar.options.EnableInPlaceCreateEvent = False
    calendar.options.EnableInPlaceEditEventSubject_AfterEventResize = False
    calendar.options.EnableInPlaceEditEventSubject_ByF2 = False
    calendar.options.EnableInPlaceEditEventSubject_ByMouseClick = False
    calendar.options.EnableInPlaceEditEventSubject_ByTab = False
    calendar.options.EnablePrevNextEventButtons = False

   
    'Initialisierungszeitraum setzen
    mLoadedStartDate = Now()
   
    mLoadedEndDate = mLoadedStartDate
   

    'Druckangaben
    calendar.PrintOptions.header.textleft = g_Util.LanguagePack.TranslateString("Datum") & ": " & DateValue(Now)
    calendar.PrintOptions.header.TextCenter = gBenutzer.rs.Fields("Name")
    calendar.PrintOptions.header.TextRight = g_Util.LanguagePack.TranslateString("Zeit") & ": " & TimeValue(Now)
    calendar.PrintOptions.Footer.textleft = "(c)1985-" & Year(Now) & " FlowFact CRM"
    calendar.PrintOptions.Footer.TextRight = g_Util.LanguagePack.TranslateString("Seite %1 von %2", 1, 1)
    calendar.PrintOptions.Footer.textleft = "(c)1985-" & Year(Now) & " FlowFact CRM"

    calendar.PrintOptions.PrintFrom = TimeValue(TimeSerial(6, 0, 0))
    calendar.PrintOptions.PrintTo = TimeValue(TimeSerial(23, 0, 0))
    calendar.PrintOptions.PrintFromToExactly = True
   
   
    'Kontextmenü
    mmuNew.Caption = g_Util.LanguagePack.TranslateString("Neuer Termin") & "..."
    mmuPrint.Caption = g_Util.LanguagePack.TranslateString("Drucken") & "..."
    mmuPrintPreviw.Caption = g_Util.LanguagePack.TranslateString("Druckvorschau") & "..."
    mmuTeilnehmer.Caption = g_Util.LanguagePack.TranslateString("Merkmale") & "..."
    mmuOptions.Caption = g_Util.LanguagePack.TranslateString("Optionen") & "..."
   
    'Markup aktivieren
    calendar.MarkupEnabled = True
   
    'Grundfarbe für erledigte Mails hinzufügen
    calendar.DataProvider.LabelList.AddLabel Val(0), Val(0), g_Util.k("0")
   
End Sub


Back to Top
ilya View Drop Down
Groupie
Groupie


Joined: 07 May 2012
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote ilya Quote  Post ReplyReply Direct Link To This Post Posted: 31 May 2013 at 2:19pm
Please create a simple project illustrating your issue and post it here or better using customer support ticket system. Thanks
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.141 seconds.