I think I just found a simpler way. In the click event, set SelStart and SelLength. What you set SelLength to will depend on the data type of the text box's control source. For instance, because what I tested this on was a numeric field, I had to use:
IF NOT EMPTY(THIS.Value)
THIS.SelStart = 0
THIS.SelLength = LEN( TRANSFORM(THIS.Value, THIS.InputMask) )
ENDIF
>You can achieve this effect by putting a transparent shape in front of the textbox. Put code in the shape's click event to set focus to the textbox (thisform.text1.setfocus).
>
>>that's what i was afraid of. But how do i stop it. I might be able to trap the click event and just not do dodefault the first time the click is called.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing