SOLVED: Office 2010 sample Background Colors |
Post Reply |
Author | |
McKloony
Senior Member Joined: 09 January 2007 Location: Germany Status: Offline Points: 340 |
Post Options
Thanks(0)
Posted: 11 March 2011 at 4:08am |
Congratiolations for the great VB Office 2010 sample. But how can I set the individuell Background Colors like you can see in the picture below? |
|
Product: Xtreme SuitePro (ActiveX) 16.2.5
Platform: XP / Windows 7 Language: Visual Basic 6.0 SP6 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Here is a small sample:
CalendarControl.BeforeDrawThemeObjectFlags = -1
Private Sub CalendarControl_BeforeDrawThemeObject(ByVal eObjType As XtremeCalendarControl.CalendarBeforeDrawThemeObject, ByVal Params As Variant)
Dim pTheme2007 As CalendarThemeOffice2007 Set pTheme2007 = CalendarControl.Theme If eObjType = xtpCalendarBeforeDraw_DayViewTimeScaleCaption Then CalendarControl.Theme.DayView.TimeScale.Caption.Font.Italic = (Second(Now) Mod 2) = 0 CalendarControl.Theme.DayView.TimeScale.Caption.Color = RGB(10, 200, 100) CalendarControl.Theme.DayView.TimeScale.LineColor = RGB(10, 200, 100) ElseIf eObjType = xtpCalendarBeforeDraw_DayViewCell Then Dim pCell As CalendarThemeDayViewCellParams Set pCell = Params If pCell.Index Mod 3 = 0 Then If pCell.WorkCell Then pTheme2007.DayView.Day.Group.Cell.WorkCell.BackgroundColor = RGB(200, 255, 0) Else pTheme2007.DayView.Day.Group.Cell.NonWorkCell.BackgroundColor = RGB(255, 200, 0) End If End If ElseIf eObjType = xtpCalendarBeforeDraw_DayViewDay Then pTheme2007.DayView.Day.Header.BaseColor = 20000 + 100 * Weekday(Params.Date) pTheme2007.DayView.Day.Header.TodayBaseColor = RGB(0, 0, 0) End If End Sub |
|
McKloony
Senior Member Joined: 09 January 2007 Location: Germany Status: Offline Points: 340 |
Post Options
Thanks(0)
|
Tank you verry much, this was exactly waht I was looking for.
|
|
Product: Xtreme SuitePro (ActiveX) 16.2.5
Platform: XP / Windows 7 Language: Visual Basic 6.0 SP6 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |