Selecting (Highlighting) text in a text box

Selecting (Highlighting) text in a text box

Post by Rex Phillip » Thu, 13 Sep 2001 00:04:26



I know this may not seem like a difficult question but I can't figure it
out. I have a form that reads data from a pocket database and fills in a few
text boxes. I set focus to the first text box, then I need to select all of
the data in the text box (highlight it) like when you double click the mouse
in the text box. Any Ideas.....

Thanks
Rex Phillips
DSD Inc
Dallas, Texas

 
 
 

Selecting (Highlighting) text in a text box

Post by Tony Wrigh » Thu, 13 Sep 2001 00:20:32


Rex,
Not knowing what programming language you are using...... :-)
 I can suggest a solution for eVB

 text1.selstart = 0
 text1.sellength = len(text1)

(Assuming your text box is 'Text1')

Tony Wright


Quote:> I know this may not seem like a difficult question but I can't figure it
> out. I have a form that reads data from a pocket database and fills in a
few
> text boxes. I set focus to the first text box, then I need to select all
of
> the data in the text box (highlight it) like when you double click the
mouse
> in the text box. Any Ideas.....

> Thanks
> Rex Phillips
> DSD Inc
> Dallas, Texas


 
 
 

Selecting (Highlighting) text in a text box

Post by rz » Thu, 13 Sep 2001 05:47:43


Check EM_SETSEL and related messages, and the Edit_ macros defined in
windowsx.h.

--
-----------------------------------------
To reply to me, remove the underscores (_) from my email address.

Robert E. Zaret
PenFact, Inc.
46 Beach Street
Boston, MA 02111
www.penfact.com


>I know this may not seem like a difficult question but I can't figure it
>out. I have a form that reads data from a pocket database and fills in a
few
>text boxes. I set focus to the first text box, then I need to select all of
>the data in the text box (highlight it) like when you double click the
mouse
>in the text box. Any Ideas.....

>Thanks
>Rex Phillips
>DSD Inc
>Dallas, Texas

 
 
 

1. How to select a discontinue text in an Edit control

hello all,

    I'm trying to implement a custom selection of a discontinue text
in a
Edit control,On Window we use EM_EXSETSEL message it is unsupported on
WindowsCE, so I don't know how to do, can someone help me with an
example or suggestion please.

I'll be waiting for any comment.
Regards
Abdelilah

2. (pix) routing issue - ospf

3. How to get the selected text of the active application

4. LZCompressing w/o COMPRESS.EXE

5. Selecting text on GotFocus event

6. PGP & Linux

7. hidden text boxes

8. Problems with file I/O and the value 13 (EOF?)

9. hand held device shows hidden text boxes

10. cannot right align text boxes

11. Get text from combo box.

12. Text box alignment