Another good use is to set the format to  'h:mm tt' for the time mode to get
rid of those stupid seconds. You obviously also figured out you need
commctrl in uses clause which I left out. After  writing this I thought to
myself I really should see if I could put code into a enhanced component of
TDateTimePicker as I'm often using this code. Plus add the ability to choose
several formats. My first attempt failed however after putting the code into
the create event after inherited (then tried a onshow event). I'll gladly
trade my virtual chocolate fish if someone else succeeds in this quest.
P.S  another tip on this is if your datetimepicker is on a tabcontrol thats
not shown you will need to place this code in the tabcontrols onshow event.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Peter Hyde
Sent: Wednesday, May 23, 2001 11:25 AM
To: Multiple recipients of list delphi
Subject: RE: [DUG]: TDateTimePicker/Win32


Alan wrote:

>   DFormat :=  'ddd dd/MMM/yyyy';
>   DateTimePicker1.Perform( DTM_SETFORMAT , DWORD(NIL) , DWORD(DFormat)
>   );

Fascinating. On further research with the above hint, I find that if
there is a dddd or a MMMM in there, or if the dd is made into a
simple 'd', the fix falls apart and the formatting gets ugly again.

It just can't cope with long day or month names, i.e. any field which
significantly changes width.  What a truly dumb control.


cheers,
peter

============================================
Peter Hyde, WebCentre Ltd & SPIS Ltd, Christchurch, New Zealand
* Web automation for online periodicals: http://TurboPress.com
* TurboNote+: http://TurboPress.com/tbnote.htm
  -- easy, small, handy onscreen sticky notes
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to