Print Page | Close Window

change color of eventbar in timeline mode

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=15045
Printed Date: 20 May 2024 at 11:47am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: change color of eventbar in timeline mode
Posted By: Ditte
Subject: change color of eventbar in timeline mode
Date 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



Replies:
Posted By: mdoubson
Date Posted: 26 August 2009 at 1:38pm
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



-------------
Mark Doubson, Ph.D.


Posted By: Ditte
Date Posted: 26 August 2009 at 3:25pm
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


Posted By: mdoubson
Date Posted: 26 August 2009 at 3:30pm
Of course - your way is proper. I just show you internal logic in MFC Core.

-------------
Mark Doubson, Ph.D.


Posted By: Ditte
Date Posted: 26 August 2009 at 5:07pm
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


Posted By: mdoubson
Date Posted: 26 August 2009 at 5:21pm
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)



-------------
Mark Doubson, Ph.D.


Posted By: Ditte
Date Posted: 28 August 2009 at 8:12am
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


Posted By: mdoubson
Date Posted: 02 September 2009 at 11:56am
Thanks for catch - I fixed it - please get updated ocx - https://forum.codejock.com/uploads/BetaOCX/CalendarBeta13-2.rar - https://forum.codejock.com/uploads/BetaOCX/CalendarBeta13-2.rar

-------------
Mark Doubson, Ph.D.



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