Calendar Control Caption buttons |
Post Reply |
Author | |
mitcheljh
Groupie Joined: 20 July 2008 Location: United States Status: Offline Points: 35 |
Post Options
Thanks(0)
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 |
|
mitcheljh
Groupie Joined: 20 July 2008 Location: United States Status: Offline Points: 35 |
Post Options
Thanks(0)
|
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 |
|
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 |