Re: Auto Highlight in Text Box
- Posted by robsz1 at netzero.net Sep 29, 2002
- 427 views
This is a multi-part message in MIME format. ------=_NextPart_000_000E_01C26771.D0E48DC0 charset="iso-8859-1" Well, pretty simply actually. When the control gets focus, get the text and try to match '.' then = highlight it. atom junk junk =3D sendMessage( <control>,EM_SETSEL, <start highlight at this = point>, -1) numeric values -1 hilights up to the end of text ----- Original Message -----=20 From: Tony Steward=20 To: EUforum=20 Sent: Sunday, September 29, 2002 3:52 AM Subject: Auto Highlight in Text Box Hi All, Using Win32lib I have a form allowing the user to enter data. What I = am trying to achieve is that when a user saves the record and then tabs = to a text box to enter data for the next record, I want my program to = search the test currently in the box and is it finds a "." period it = should highlight any text from thispoint onwards. This way if a user is entering a list of doors as follows entry should = be much faster and easier as they only need to type whatever preceeds = the period once. D1 Gosford Hospital. Maternity D2 Gosford Hospital. A & E D3 Gosford Hospital. Security D4 Gosford Hospital. Surgery Thanks Tony Steward=20 =3D=3D^^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D This email was sent to: robsz1 at netzero.net =3D=3D^^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ------=_NextPart_000_000E_01C26771.D0E48DC0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Well, pretty simply = actually.</FONT></DIV> <DIV><FONT face=3DArial size=3D2>When the control gets focus, get the = text and try=20 to match '.' then highlight it.</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>atom junk</FONT></DIV> <DIV><FONT face=3DArial size=3D2>junk =3D sendMessage( = <control>,EM_SETSEL,=20 <start highlight at this point>, -1)</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>numeric values</FONT></DIV> <DIV><FONT face=3DArial size=3D2>-1 hilights up to the end of = text</FONT></DIV> <BLOCKQUOTE=20 style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: = 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A href=3D"mailto:lockmaster67 at aol.com" = title=3Dlockmaster67 at aol.com>Tony=20 Steward</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A = href=3D"mailto:EUforum at topica.com"=20 title=3DEUforum at topica.com>EUforum</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Sunday, September 29, = 2002 3:52=20 AM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Auto Highlight in Text = Box</DIV> <DIV><BR></DIV><PRE>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The Euphoria = Mailing List =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20 </PRE><FONT face=3Darial,helvetica><FONT face=3DArial lang=3D0 size=3D2=20 FAMILY=3D"SANSSERIF">Hi All,<BR>Using Win32lib I have a form allowing = the user=20 to enter data. What I am trying to achieve is that when a user saves = the=20 record and then tabs to a text box to enter data for the next record, = I want=20 my program to search the test currently in the box and is it finds a = "."=20 period it should highlight any text from thispoint = onwards.<BR><BR>This way if=20 a user is entering a list of doors as follows entry should be much = faster and=20 easier as they only need to type whatever preceeds the period=20 once.<BR><BR>D1 = Gosford=20 Hospital. = Maternity<BR>D2 =20 Gosford Hospital. A &=20 E<BR>D3 Gosford = Hospital.=20 Security<BR>D4 Gosford = Hospital. Surgery<BR><BR>Thanks<BR>Tony Steward</FONT> = <PRE>=3D=3D^^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D This email was sent to: robsz1 at netzero.net EASY UNSUBSCRIBE click here: <A = href=3D"http://topica.com/u/?b1dd66.b3fcPV">http://topica.com/u/?b1dd66.b= 3fcPV</A> Or send an email to: EUforum-unsubscribe at topica.com T O P I C A -- Register now to manage your mail! <A = href=3D"http://www.topica.com/partner/tag02/register">http://www.topica.c= om/partner/tag02/register</A> =3D=3D^^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</PRE></BLOCKQUOTE></FONT= ------=_NextPart_000_000E_01C26771.D0E48DC0-- ------------------------------------------- Introducing NetZero Long Distance Unlimited Long Distance only $29.95/ month! Sign Up Today! www.netzerolongdistance.com