![]() |
change color of eventbar in timeline mode |
Post Reply ![]() |
Author | |
Ditte ![]() Groupie ![]() Joined: 28 October 2007 Status: Offline Points: 94 |
![]() ![]() ![]() ![]() ![]() Posted: 26 August 2009 at 6:55am |
Hi,
maybe Iīm nīt on the right. Iīve make some changes of the color in timeline mode. There is a property CalendarControl.TimeLineView.EventBarColor = RGB(255, 255, 0) ' Yellow, itīs only a test to see the changes really. The EventBarColor is the line under the last event. Itīs works fine There is CalendarControl.TimeLineView.EventBarLineColor = RGB(255, 255, 0) EventBarLineColor should be yellow, but I can do what I want. I donīt see any changes? There is no effect by change it. There is a little picture (I mean the dark blue line at the event) ![]() At last, I canīt see any effect at CalendarControl.TimeLineView.MaxPixelsForEvent ?? Thanks. |
|
Regards
Dittmar Product: Xtreme SuitePro (ActiveX) 13.4.2 Platform: Win XP Language: Visual Dataflex 16.1 |
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
TimelineMaxPixelsForEvent and similar used to CalcEventSize:
CSize CXTPCalendarPaintManager::CTimeLineViewPart::CalcEventSize(CDC* pDC,
CXTPCalendarTimeLineViewEvent* pEventView){ CSize szEvent = m_pimgEvent->GetExtent(); CSize szText = GetTextExtent(pDC, pEventView->GetItemTextSubject()); int iMaxPixels = pEventView->GetView()->m_nTimelineMaxPixelsForEvent; int nScaleID = pEventView->GetView()->GetTimeScaleID(); if (nScaleID == 1) iMaxPixels = pEventView->GetView()->m_nTimelineMaxPixelsForEvent_ScaleDay; else if (nScaleID == 2) iMaxPixels = pEventView->GetView()->m_nTimelineMaxPixelsForEvent_ScaleWeek; szEvent.cx = szEvent.cx + min(szText.cx, iMaxPixels) + 10; szEvent.cy = max(szEvent.cy, szText.cy) + 10; return szEvent; } -------------------------------------------------------------------
Colors:
pDC->FillSolidRect(rcB1, m_clrEventBar); //EventBarColor
rcB1.bottom = rcB1.top + 1; pDC->FillSolidRect(rcB1, m_clrEventBarLine);//EventBarLineColor |
|
![]() |
|
Ditte ![]() Groupie ![]() Joined: 28 October 2007 Status: Offline Points: 94 |
![]() ![]() ![]() ![]() ![]() |
Hi Mark,
thanks for your answer. There is no simpler way to set the color? Whatīs with the syntax: CalendarControl.TimeLineView.EventBarLineColor = RGB(255, 255, 0)? Can you give me a part for the VB6 sample? |
|
Regards
Dittmar Product: Xtreme SuitePro (ActiveX) 13.4.2 Platform: Win XP Language: Visual Dataflex 16.1 |
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
Of course - your way is proper. I just show you internal logic in MFC Core.
|
|
![]() |
|
Ditte ![]() Groupie ![]() Joined: 28 October 2007 Status: Offline Points: 94 |
![]() ![]() ![]() ![]() ![]() |
Mark,
have yo tested it also. I canīt see any changes? |
|
Regards
Dittmar Product: Xtreme SuitePro (ActiveX) 13.4.2 Platform: Win XP Language: Visual Dataflex 16.1 |
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
I did in MFC - should be the same in VB
(may be not all supported now in you draw case - e.g. you don't have groups. Try switch to MusltiSchedules mode and you will have groups)
CalendarControl.TimeLineView.clrEventBar = RGB(192,192,255)
CalendarControl.TimeLineView.clrEventBarLine= RGB(244,192,255) CalendarControl.TimeLineView.clrTimeScaleBackground= RGB(192,192,255) CalendarControl.TimeLineView.clrTimeScaleBorder= RGB(192,192,255) CalendarControl.TimeLineView.clrTimeScaleText= RGB(192,192,255) CalendarControl.TimeLineView.clrSelectedBackground= RGB(192,192,255) CalendarControl.TimeLineView.clrSelectedText= RGB(192,192,255)
CalendarControl.TimeLineView.clrText= RGB(255,192,255) CalendarControl.TimeLineView.clrBackground = RGB(224,224,224) |
|
![]() |
|
Ditte ![]() Groupie ![]() Joined: 28 October 2007 Status: Offline Points: 94 |
![]() ![]() ![]() ![]() ![]() |
I give up.
CalendarControl.TimeLineView.EventBarLineColor donīt works for me |
|
Regards
Dittmar Product: Xtreme SuitePro (ActiveX) 13.4.2 Platform: Win XP Language: Visual Dataflex 16.1 |
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
Thanks for catch - I fixed it - please get updated ocx - https://forum.codejock.com/uploads/BetaOCX/CalendarBeta13-2.rar
|
|
![]() |
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 |