Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - CalendarTheme2007 and BeforeDrawDayViewCell
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CalendarTheme2007 and BeforeDrawDayViewCell

 Post Reply Post Reply
Author
Message
g.achrainer View Drop Down
Newbie
Newbie


Joined: 06 June 2006
Location: Austria
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote g.achrainer Quote  Post ReplyReply Direct Link To This Post Topic: CalendarTheme2007 and BeforeDrawDayViewCell
    Posted: 29 September 2006 at 5:20am
Hi,

seems as if "BeforeDrawDayViewCell" only works when using the "old" 2003 theme, but not if I use the new 2007 theme.

I want to display individual working time for each day as well as a planned lunch time.

How would I do that using 10.3?

Thanks in advance,

Gerhard
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 02 October 2006 at 4:30pm
Hi,

When customizing themes (2007 and others in future) you can use another notification BeforeDrawThemeObject. Below is the example:

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        AxCalendarControl1.SetTheme(New CalendarThemeOffice2007Class)

        If Not AxCalendarControl1.BeforeDrawThemeObjectFlags Is Nothing Then
            AxCalendarControl1.BeforeDrawThemeObjectFlags.SetFlag(CalendarBeforeDrawThemeObject.xtpCalendarBeforeDraw_DayViewDay)
        End If

        AxCalendarControl1.Populate()
    End Sub

    Private Sub AxCalendarControl1_BeforeDrawThemeObject(ByVal sender As Object, ByVal e As AxXtremeCalendarControl._DCalendarControlEvents_BeforeDrawThemeObjectEvent) Handles AxCalendarControl1.BeforeDrawThemeObject
        Dim pTheme2007 As CalendarThemeOffice2007
        pTheme2007 = AxCalendarControl1.Theme
        Dim pDay As CalendarViewDay

        If e.eObjType = CalendarBeforeDrawThemeObject.xtpCalendarBeforeDraw_DayViewDay Then
            pDay = e.drawParams

            If ... Then
                pTheme2007.DayView.Day.Group.Cell.WorkCell.BackgroundColor = RGB(..., ..., ...)
            End If
        End If
    End Sub


--
WBR,
Serge
Back to Top
g.achrainer View Drop Down
Newbie
Newbie


Joined: 06 June 2006
Location: Austria
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote g.achrainer Quote  Post ReplyReply Direct Link To This Post Posted: 03 October 2006 at 9:22am
Hi,

thanks for the hint, it almost works now, but there is one issue left:
having a Variant as Parameter, which is an Interface or an object is not possible to implement in Gupta Teamdeveloper.
I worked around that declaring the Parameter as Interface which seems to be ok as long as I don't use "xtpCalendarBeforeDraw_DayViewTimeScale" etc.
Would be nice to have one parameter for the Interface, if any, and another for the numeric information.

Anyway, for now it works, thank you once again.

Regards,

Gerhard
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.137 seconds.