Print Page | Close Window

Bug when scrolling whole day selection

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=6721
Printed Date: 01 May 2024 at 5:43am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Bug when scrolling whole day selection
Posted By: mgampi
Subject: Bug when scrolling whole day selection
Date Posted: 23 March 2007 at 4:55pm
Hi;
I think that I found a bug in calendar control of toolkit version 10.4.2 when scrolling full day selections in workweek or day view mode. To reproduce create a calendar control in workweek view, add two or three additional days, disable horizontal scrolling.
Select one full day and then use the cursor left/right keys to scroll the selection. When scrolling to the left, the selection goes out of the view. In the opposite, when scrolling to the right, it's impossible to select the rightmost day.
 
Here's a brief code sequence for how I create the day view:
 
GetCalendarCtrl().SetWorkDayStartTime(0,0,0);
GetCalendarCtrl().SetWorkDayEndTime(23,59,59);
GetCalendarCtrl().GetActiveView()->EnableHScroll(FALSE);
CXTPCalendarThemeOffice2007* pTheme = new CXTPCalendarThemeOffice2007();
pTheme->SetAskItemTextFlags(xtpCalendarItemText_DayViewDayHeaderLeft|xtpCalendarItemText_DayViewDayHeaderCenter|xtpCalendarItemText_DayViewDayHeaderRight);
GetCalendarCtrl().SetTheme(pTheme);
CXTPCalendarDayView* pDayView=reinterpret_cast<CXTPCalendarDayView*>(GetCalendarCtrl().GetActiveView());
COleDateTime dtEnd=COleDateTime::GetCurrentTime();
COleDateTime dtStart=dt-COleDateTimeSpan(10,0,0,0);
dtEnd-=COleDateTimeSpan(1,0,0,0);
GetCalendarCtrl().SetWorkWeekMask(xtpCalendarDayAllWeek);
GetCalendarCtrl().SwitchActiveView(xtpCalendarWorkWeekView);
pDayView->ShowDays(dt1, dt);
GetCalendarCtrl().GetCalendarOptions()->bDayView_TimeScaleShowMinutes=TRUE;
GetCalendarCtrl().GetCalendarOptions()->nDayView_CurrentTimeMarkVisible=xtpCalendarCurrentTimeMarkNone;
GetCalendarCtrl().GetCalendarOptions()->nDayView_ScaleInterval=15;
 
The same bug can be reproduced when using the CalendarDemo sample by modifying the OnCalendarViewWorkWeek() function.
Add
GetCalendarCtrl().GetActiveView()->EnableHScroll(FALSE);
right after swithing the view. The select the whole day by clicking just below the date caption and the try to move the selection to the left and right...
 
On the other hand, perhaps I'm doing something wrong, when setting up the calendar view? In any case, I need a fix for this problem; so help is most welcome.
 


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017



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