Wallace, <div><br></div><div>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. </div><div><br></div><div>Edit1.selstart tells you the current cursor position <br>
<br><div class="gmail_quote">On Tue, Jun 7, 2011 at 10:28 AM, David O&#39;Brien <span dir="ltr">&lt;<a href="mailto:Dave@iccs.co.nz">Dave@iccs.co.nz</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="white" lang="EN-NZ" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">You could post a shift-tab message?</span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt">From:</span></b><span lang="EN-US" style="font-size:10.0pt"> <a href="mailto:delphi-bounces@delphi.org.nz" target="_blank">delphi-bounces@delphi.org.nz</a> [mailto:<a href="mailto:delphi-bounces@delphi.org.nz" target="_blank">delphi-bounces@delphi.org.nz</a>] <b>On Behalf Of </b>Marshland Engineering<br>
<b>Sent:</b> Monday, 6 June 2011 3:12 p.m.<br><b>To:</b> <a href="mailto:delphi@delphi.org.nz" target="_blank">delphi@delphi.org.nz</a><br><b>Subject:</b> [DUG] RE Data validation.</span></p></div></div><p class="MsoNormal">
 </p><div><p class="MsoNormal"><span style="font-size:10.0pt">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. </span></p>
</div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal"><span style="font-size:10.0pt">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 ?</span></p>
</div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal"><span style="font-size:10.0pt">Along a similar line, is there a way to find where the cursor is within a string in and edit box ?</span></p></div><div><p class="MsoNormal">
 </p></div><div><p class="MsoNormal"><span style="font-size:10.0pt">Thanks Wallace</span></p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">
 </p></div><div><p class="MsoNormal"> </p></div></div></div><br>_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
Unsubscribe: send an email to <a href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe<br></blockquote></div><br><br clear="all"><br>-- <br>Kyley Harris<br>Harris Software<br>
+64-21-671-821<br>
</div>