Re: [DUG] RE Data validation.

2011-06-06 Thread David Brennan
To answer your first question TField.FocusControl will focus the first editor linked to the field. With the edit box you can probably use something like SelStart to do what you are wanting (the details depend a bit on the edit control though I think and I haven't used the standard VCL ones in

Re: [DUG] RE Data validation.

2011-06-06 Thread Kyley Harris
Wallace, normally there are some events in windows to tell you the windows handle of the last item that had focus, as well as the one that now has focus. Edit1.selstart tells you the current cursor position On Tue, Jun 7, 2011 at 10:28 AM, David O'Brien wrote: > You could post a shift-tab mess

Re: [DUG] RE Data validation.

2011-06-06 Thread David O'Brien
You could post a shift-tab message? From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Marshland Engineering Sent: Monday, 6 June 2011 3:12 p.m. To: delphi@delphi.org.nz Subject: [DUG] RE Data validation. After a bit of experimenting, it seems that the OnV

Re: [DUG] RE Data validation.

2011-06-06 Thread Colin Johnsun
Try Application.ActiveForm.ActiveControl Cheers, Colin On 6 June 2011 13:12, Marshland Engineering wrote: > After a bit of experimenting, it seems that the OnValidate is triggered > once you leave the dbEdit box and it is before the Post is committed. This > means that you get a message direct