[DUG] RE Data validation.

Kyley Harris Kyley at harrissoftware.com
Tue Jun 7 10:33:11 NZST 2011


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 <Dave at iccs.co.nz> wrote:

> You could post a shift-tab message?
>
>
>
> *From:* delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz]
> *On Behalf Of *Marshland Engineering
> *Sent:* Monday, 6 June 2011 3:12 p.m.
> *To:* delphi at delphi.org.nz
> *Subject:* [DUG] RE Data validation.
>
>
>
> 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 directly after the box you have just entered
> the data into.
>
>
>
> This words great for data validation across many forms, but, it tells you
> the error, however it does not does not return you the box you have just
> left. Is there a way to put the cursor back to the dbEdit box if an error is
> encountered ?
>
>
>
> Along a similar line, is there a way to find where the cursor is within a
> string in and edit box ?
>
>
>
> Thanks Wallace
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
> unsubscribe
>



-- 
Kyley Harris
Harris Software
+64-21-671-821
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20110607/fc69abb0/attachment.html 


More information about the Delphi mailing list