Resync Calendar with DatePicker |
Post Reply |
Author | |
AndyWilton
Groupie Joined: 03 June 2008 Status: Offline Points: 82 |
Post Options
Thanks(0)
Posted: 22 January 2010 at 11:07am |
Hi All,
I have a scenario where I select various different dates in the DatePicker using the 'Select' method. The problem is that if the DatePicker is attached to a Calendar, the Calendar is not updating.
Eg. We start with a scenario where both the Calendar and the DatePicker has 1st January highlighted / selected.
I then select 4th, 6th and 10th January on the DatePicker via the 'Select' method. The DatePicker then has those dates selected BUT the Calendar is still showing the 1st of January.
Does anybody know of a method to tell the Calendar to Resync itself with the DatePicker.
The above obviously works if the DatePicker selections are done via the mouse, but I need to do it via code.
Thanks in advance.
Andy
|
|
Product: Xtreme SuitePro (ActiveX) v11.2.1 -> v15.2.1
Platform: Windows XP / Vista / Win 7 Language: Clarion 5.5 -> C8.x ====================================== Andy Wilton |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
this is working code for MFC app
COleDateTime odt1 = COleDateTime(2009,8,1,0,0,0); COleDateTime odt2 = COleDateTime(2009,9,1,0,0,0); CXTPDatePickerControl* pDatePicker = &((CMainFrame*) GetParentFrame())->m_dlgDatePicker.m_wndDatePicker; pDatePicker->SetRange(&odt1, &odt2); pDatePicker->SetSelRange(odt1, odt2); ---- all above you can do in VB
pDatePicker->GetConnection()->SendEvent(XTP_NC_DATEPICKERSELECTIONCHANGED, 0, 0);
----coud you do smth similar in VB? |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
You can call it, but it won't update still. Problem is wndDatePicker.Select does not fire wndDatePicker_SelectionChanged:
wndDatePicker.Selection.AllowNoncontinuousSelection = True wndDatePicker.Select "01/20/2010" wndDatePicker.Select "01/25/2010" wndDatePicker.Select "01/27/2010" Call wndDatePicker_SelectionChanged |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
https://forum.codejock.com/uploads/BetaOCX/CalendarBeta14.rar
had new function datepicker.ResyncCalendar
and also modified function
datepicker.FirstWeekOfYearDays = (say 4 for Germany) to make proper Print / PrintPreview small calendars with week numbers
|
|
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 |