Hi Marcia,
Wouldn't
This.SelLength = LEN( This.Text )
work?
>
Is there a way to make VFP select all of a textbox when it gets focus? >
>In addition to what Fred and Armin told you, if you are going to go this route in the GotFocus(), you need to do it in a manner similar to this:
>
>
>Textbox::GotFocus()
>This.SelStart = 0
>This.SelLength = LEN( TRANSFORM( This.Value ) )
>NODEFAULT
>
>
>The reason is that the default VFP GotFocus behavior ( and by default the native behavior executes at the end of the method after your custom code ) resets SelStart and SelLength. So what you need to do is run the native code before your custom code and suppress it afterwaRD.
--sb--