Board index » delphi » D4 TDateTimePicker is not as good as the D3 version

D4 TDateTimePicker is not as good as the D3 version

The D3 DateTimePicker changed the DateTime property any time the date
changed in the calendar.    That way you could have a treeview/listbox
updated with each date change.

Now it only changes the variable FLastChange which is only used to update
DateTime when doing the close up of the calendar.  Worst of all, FLastChange
is private and is unavailable to one's OnChange event so that the Inprise
developers have basically given the finger to anybody who would dare code
around this or make a descendant to reinstate the previous behavior.

If anybody has any alternatives for me to consider, I'd love to here them.
Thanks in advance.

 

Re:D4 TDateTimePicker is not as good as the D3 version


In article <6seocp$7...@forums.borland.com>, m...@messagelink.com says...

Quote
> The D3 DateTimePicker changed the DateTime property any time the date
> changed in the calendar.    That way you could have a treeview/listbox
> updated with each date change.

> Now it only changes the variable FLastChange which is only used to update
> DateTime when doing the close up of the calendar.  Worst of all, FLastChange
> is private and is unavailable to one's OnChange event so that the Inprise
> developers have basically given the finger to anybody who would dare code
> around this or make a descendant to reinstate the previous behavior.

> If anybody has any alternatives for me to consider, I'd love to here them.
> Thanks in advance.

We've just updated our DateTime Suite w' DateTimeEdit (which is the
component you'll want to evaluate).  It's at: www.adrock.com - do feel
free to check it out.

--
Regards  Duncan McC
(remove nosmeggingspam to reply e-mail)
www.adrock.com

Re:D4 TDateTimePicker is not as good as the D3 version


I will, but I managed to figure out how to get around the problem.  By
querying the Windows control directly from withing the OnChange, I managed
to find out what date it was highlighting.
Quote
DuncanMcC wrote in message ...
>We've just updated our DateTime Suite w' DateTimeEdit (which is the
>component you'll want to evaluate).  It's at: www.adrock.com - do feel
>free to check it out.

>--
>Regards  Duncan McC
>(remove nosmeggingspam to reply e-mail)
>www.adrock.com

Re:D4 TDateTimePicker is not as good as the D3 version


Quote
>By
>querying the Windows control directly from withing the OnChange, I managed
>to find out what date it was highlighting.

Exactly what code did you use to access this?  I tried .Date and .DateTime
and it still did not give it to me in the OnChange event.

Mike V.

Re:D4 TDateTimePicker is not as good as the D3 version


DateTime isn't changed as far as OnChange knows since only the Private
FLastChange variable is updated when the calendar is DroppedDown.  If you
want to get the date that is highlightedyou have to query the Windows
control directly within the OnChange as
follows:

If Sender is TDateTimePicker Then
   If TDateTimePicker(Sender).DroppedDown Then begin
     IF DateTime_GetSystemTime(TDateTimePicker(Sender).Handle, Value) =
GDT_VALID Then
      HighlightedDate := SystemTimeToDateTime(Value);
  end;

DateTime_GetSystemTime is in the CommCtrl unit.

Quote
Mike Viens wrote in message <6smj2g$ih...@forums.borland.com>...
>Exactly what code did you use to access this?  I tried .Date and .DateTime
>and it still did not give it to me in the OnChange event.

>Mike V.

Other Threads