Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - change color of eventbar in timeline mode
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

change color of eventbar in timeline mode

 Post Reply Post Reply
Author
Message
Ditte View Drop Down
Groupie
Groupie


Joined: 28 October 2007
Status: Offline
Points: 94
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ditte Quote  Post ReplyReply Direct Link To This Post Topic: change color of eventbar in timeline mode
    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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Ditte View Drop Down
Groupie
Groupie


Joined: 28 October 2007
Status: Offline
Points: 94
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ditte Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 3:30pm
Of course - your way is proper. I just show you internal logic in MFC Core.
Back to Top
Ditte View Drop Down
Groupie
Groupie


Joined: 28 October 2007
Status: Offline
Points: 94
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ditte Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post 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)

Back to Top
Ditte View Drop Down
Groupie
Groupie


Joined: 28 October 2007
Status: Offline
Points: 94
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ditte Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post 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
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.188 seconds.