Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - Bug when scrolling whole day selection
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Bug when scrolling whole day selection

 Post Reply Post Reply
Author
Message
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Topic: Bug when scrolling whole day selection
    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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.