Textbox- Select all when textbox got Focus? 
Author Message
 Textbox- Select all when textbox got Focus?

I've got a textbox on the form.
I've got Format=K ( Select all)

If I double click on the box, all items in the box are selected.

I just want a user to do One click on the box and to have all items
selected.

This should be easy.  I don't know what I'm missing.

TIA
Steve Hall



Sun, 27 Oct 2002 03:00:00 GMT  
 Textbox- Select all when textbox got Focus?
Hey Steve,

In your click method, try this:

This.SelStart = 0
This.SelLength = LEN( RTRIM(This.Value) )

Good luck,

John


Quote:
> I've got a textbox on the form.
> I've got Format=K ( Select all)

> If I double click on the box, all items in the box are selected.

> I just want a user to do One click on the box and to have all items
> selected.

> This should be easy.  I don't know what I'm missing.

> TIA
> Steve Hall



Sun, 27 Oct 2002 03:00:00 GMT  
 Textbox- Select all when textbox got Focus?
Hi Steve,
Try
    This.SetFocus()
in yourTextbox.GotFocus()

hth
-Stefan


Quote:
> I've got a textbox on the form.
> I've got Format=K ( Select all)

> If I double click on the box, all items in the box are selected.

> I just want a user to do One click on the box and to have all items
> selected.

> This should be easy.  I don't know what I'm missing.

> TIA
> Steve Hall



Sun, 27 Oct 2002 03:00:00 GMT  
 Textbox- Select all when textbox got Focus?
Steve,

Adding to Stefan (hello) input, check the selectedonentry property.

Stefan Wuebbe a crit :

Quote:
> Hi Steve,
> Try
>     This.SetFocus()
> in yourTextbox.GotFocus()

> hth
> -Stefan


> > I've got a textbox on the form.
> > I've got Format=K ( Select all)

> > If I double click on the box, all items in the box are selected.

> > I just want a user to do One click on the box and to have all items
> > selected.

> > This should be easy.  I don't know what I'm missing.

> > TIA
> > Steve Hall

--
Fred - Armoni (France) - FE AVP&Cie
Departement Fran?ais, La Rochelle

Position : W 01 02' 54" - N 46 04' 39"
Altitude  : 4m



Sun, 27 Oct 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. textbox control on forms skipping to next textbox

2. Setting focus on a textbox on a form vfp 5.0

3. Don't want backspace in textbox to move focus

4. Denying Focus to TextBox in Grid

5. Textbox has no cursor during focus!!

6. A textBox don′t lose focus...

7. Getting textbox of dropdown listbox to display the controlsource

8. selecting text in textbox

9. TextBox Select Text

10. TextBox Select Text

11. Checking If Text In A Textbox Is Selected

12. Textbox Find and text select question

 

 
Powered by phpBB® Forum Software