![]() |
[SOLVED] Deselect for DatePicker seems non-op |
Post Reply ![]() |
Author | |
Mr.Den ![]() Groupie ![]() ![]() Joined: 26 August 2007 Status: Offline Points: 50 |
![]() ![]() ![]() ![]() ![]() Posted: 06 January 2009 at 7:31am |
Add a datepicker to a form, and execute the code:
DatePicker1.Select "1/1/2009"
As expected 1/1/2009 is selected.
Execute the code:
DatePicker1.Deselect "1/1/2009"
And 1/1/2009 remains selected.
|
|
Product: Xtreme SuitePro (ActiveX) version 16.3.1
Platform: Windows 7 Professional (64bit) - SP 1 Language: Visual Basic 6.0 SP 6 |
|
![]() |
|
dentor ![]() Senior Member ![]() ![]() Joined: 30 November 2005 Location: France Status: Offline Points: 102 |
![]() ![]() ![]() ![]() ![]() |
Hello,
Try to add a DatePicker1.RedrawControl after de Deselect command.
It works for me.
|
|
![]() |
|
Mr.Den ![]() Groupie ![]() ![]() Joined: 26 August 2007 Status: Offline Points: 50 |
![]() ![]() ![]() ![]() ![]() |
Thank you for that, it works fine. I did not see any reference to having to redraw the control in the help file |
|
Product: Xtreme SuitePro (ActiveX) version 16.3.1
Platform: Windows 7 Professional (64bit) - SP 1 Language: Visual Basic 6.0 SP 6 |
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
No - you don't need to call redraw - e.g. I check MFC ReportSample with test code:
CXTPDatePickerControl* pDatePicker = &((CMainFrame*)GetParentFrame())->m_dlgDatePicker.m_wndDatePicker; if (pDatePicker){ pDatePicker->Select(COleDateTime(2009,2,2,0,0,0)); pDatePicker->Deselect(COleDateTime(2009,2,4,0,0,0));
} and it redraw itself (maybe there is some running timer) |
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
No, timer not used for this case
|
|
![]() |
|
dentor ![]() Senior Member ![]() ![]() Joined: 30 November 2005 Location: France Status: Offline Points: 102 |
![]() ![]() ![]() ![]() ![]() |
You're right Mdoubson.
If you select another day in the DatePicker, there is no need to call Redraw after the Deselect call.
But If you don't select another day, the Deselect call doesn't not refresh the DatePicker until you call Redraw or refresh the DatePicker by selecting a date.
So we're both right.
![]() |
|
![]() |
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 |