<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18882">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT color=#000000 size=2 face=Arial>Incidentally I have taken to doing
something similar with date entry. An edit box, but in this case I put a
little arrow button at the end of it, and clicking that superimposes a date
picker over the edit box. Its rather more work but it works really
neatly, and can be easily repeated.</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#000000 size=2 face=Arial>Date entry is flexible, as a string
today could be</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#000000 size=2 face=Arial>5-feb-10</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial>5.2.10</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial>5.2.2010</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial>5/2/10</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#000000 size=2 face=Arial>on exit the date is verified,
</FONT><FONT color=#000000 size=2 face=Arial>and the date picker if clicked
populates the text field with the first format above.</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#000000 size=2 face=Arial>Entering dates like this is very
flexible, caters for those who like to use the keyboard and those who like to
use the mouse.</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#000000 size=2 face=Arial>Using the date picker is especially
cool under Vista/Windows 7 as the newer Date picker is really really nice -
anyone else noticed that?</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#000000 size=2 face=Arial>Means doing something
like:</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#000000 size=2 face=Arial>(DateTimePicker is normally
invisible)</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#000000 size=2 face=Arial>procedure
Tform1.btnStartDateClick(Sender: TObject);<BR>begin<BR>
DateTimePicker1.left:=edtStartDate.Left;<BR>
DateTimePicker1.top:=edtStartDate.Top; <BR>
DateTimePicker1.width:=edtStartDate.width+btnStartDate.Width;<BR>
DateTimePicker1.Date:=xfAdateToDTDate(edtStartDate.Text);<BR>
DateTimePicker1.Visible:=true;<BR> PickStartOrFin:=1;<BR>
DateTimePicker1.Perform(WM_SYSKEYDOWN, VK_DOWN, 0);</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial>end;<BR></FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial>//this code handles two separate edit
boxes</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial>procedure
Tform1.DateTimePicker1CloseUp(Sender: TObject);<BR>begin<BR> if
PickStartOrFin=1 then
edtStartDate.Text:=xfdtDateToAdate(DateTimePicker1.Date);<BR> if
PickStartOrFin=2 then
edtFinDate.Text:=xfdtDateToAdate(DateTimePicker1.Date);<BR>
DateTimePicker1.Visible:=false;<BR> //redisplay data to reflect new
date</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial> Redisplay data;</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial>end;<BR></DIV></FONT>
<DIV><FONT color=#000000 size=2 face=Arial>(the xfDTDatetoADate and
xfADatetoDTDate are my library routines to convert between string
dates and TDateTime)</DIV></FONT>
<DIV><FONT color=#000000 size=2 face=Arial></FONT> </DIV>
<DIV>John</DIV></BODY></HTML>