Hi there
Sorry for the delay. I tried .Refresh. I tried everything I could think of like Invalidating the control (to force redraw) but nothing seems to work.
After some reading on the net, I discovered that this is a bug in the framework 2.0. Custom format datetimepickers do not change their displayed date if they are contained within a tab page if their value is set whilst their owning tab page is not visible.
Of course, I wrote a disgusting hack which momentarily "selects" the relevant tab page whilst the DTP's value is set and then reverts to the original tab page again afterwards. The result however is a screen flifker whilst the tab page selection changes - compounded by the fact that I have several tab pages in the same control so I have to iterate through each. Not pleasant, and I will be re-working this solution before clients get it! :D
Main Topics
Browse All Topics





by: jake072Posted on 2008-11-10 at 14:02:33ID: 22926059
Have you tried doing a .Refresh after you set the value?
Jake