Print Page | Close Window

Color Schemes

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=2858
Printed Date: 03 December 2024 at 12:24pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Color Schemes
Posted By: RolandoE.
Subject: Color Schemes
Date Posted: 08 September 2005 at 7:53am

Hi,

I would like to know what I need to do in order to change the colors used within the Calendar Control. It is not very obvious by just reading the online documentation and the Demo does not touch on that subject.

Default colors are nice but users want the ability to change the colors displayed on thier calendars.

Any help will be apreciated.

Rolando




Replies:
Posted By: sserge
Date Posted: 08 September 2005 at 9:32am
Hi Rolando,

Look below for a few customization examples:

GetPaintManager()->GetDayViewHeaderPart()->SetTextColo r(RGB(255, 155, 55));
GetPaintManager()->GetDayViewHeaderPart()->SetBackgrou ndColor(RGB(5, 155, 5));

GetPaintManager()->m_clrFreeColor = RGB(55, 55, 155);
GetPaintManager()->m_clrBusyColor = RGB(255, 55, 155);

GetPaintManager()->RefreshMetrics();


Please see CXTPCalendarPaintManager class for more details.
Also you can create your own PaintManager class derived from the existing one and override some methods for customization.

We are also planning to make more flexible customization in future versions.

--
WBR,
Serge


Posted By: RolandoE.
Date Posted: 08 September 2005 at 8:38pm

Hi,

Thanks for the code this has pointed me in the right direction!!

COLORREF clrBkg = pApp->GetProfileInt("Options", "BackgroundColor", RGB(255,244,188));
COLORREF clrWD = pApp->GetProfileInt(
"Options", "WorkDayColor", RGB(255, 255, 213));

// Change Color
m_wndCalendar.GetPaintManager()->GetDayViewWorkCellPart() ->SetBackgroundColor(clrWD);
m_wndCalendar.GetPaintManager()->GetDayViewNonworkCellPar t()->SetBackgroundColor(clrBkg);

Thanks for your help.

Rolando



-------------
Rolando E. Cruz-Marshall



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