Bug when scrolling whole day selection |
Post Reply |
Author | |
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
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 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
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 |