Print Page | Close Window

Calendar Control Caption buttons

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=15085
Printed Date: 28 April 2024 at 10:21pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Calendar Control Caption buttons
Posted By: mitcheljh
Subject: Calendar Control Caption buttons
Date Posted: 31 August 2009 at 2:36pm
Hi,

I'm guessing this is a simple problem, and I'm probably not performing something in the correct order, or not calling a function that I should be.

In my calendar control, I allow the user to set (in the options) the desired theme. When initializing the calendar view (in OnInitialUpdate), I call the same function to set the theme.

The issue is, when the app is launched, the check/radio buttons for Work Week, Full Week, MultiColumn mode are all 'regular' buttons. But, after manually changing the theme, they properly change to radio/checkbox buttons.

I'm confused because I'm using the same code to set the theme, but for some reason, it's not working when the app starts. The code to set the theme is below.

void CalendarView::setTheme(XTPCalendarTheme theme)
{
if (theme == xtpCalendarThemeOffice2003) {
    GetCalendarCtrl().SetTheme(NULL);
    GetCalendarCtrl().GetPaintManager()->SetPaintTheme(xtpCalendarThemeOffice2003);
} else if (theme == xtpCalendarThemeOffice2007) {
    CXTPCalendarThemeOffice2007* pTheme = new CXTPCalendarThemeOffice2007();
    GetCalendarCtrl().SetTheme(pTheme);
}
GetCalendarCtrl().SetPaintTheme((XTPCalendarTheme)theme);
}


Thanks,

Mitch



Replies:
Posted By: mitcheljh
Date Posted: 01 September 2009 at 9:07am
I found out what the problem was, so I thought I'd share for anyone else who might run into the same problem.

The calendar view is placed inside of a docking pane, and I was initializing the calendar before setting the theme of the docking pane manager. If I wait to initialize the calendar, pPane->attach(pCalendarView) after the pane manager has had it's theme set, then the checkboxes/radio buttons show up fine on the calendar caption bar.

Thanks,

Mitch



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