1. Create a form
1. Add a textbox with the following properties:
Name = 'text1'
Format = 'RT'
InputMask = '999.999-999' (This is the InputMask use for DOT codes)
Add this code in the Init event
Value = '123456789'
2. Add a command button (cmdReset) and add this code in the Click event:
With This.text1
.Value = ''
.SetFocus()
EndWith
3. Add a command button (cmdRelease) and this code in the clik event
Thisform.Release()
Run the form, click cmdRest, and type '111' in text1. The value is automatically filled to '1113456789' but the insertion point does not move and SelLength is still 0.
Continue typing and enter '111222333'. Click cmdReset and type '111'. text1 is automatically filled to '1112223333'.
Select all text, delete it, and type '111'. No AutoFill this time.
This AutoFill behavior disappears if you remove the T from the Format property.
Is this an undocumented featured because I can't find anything relevant to this behavior in the October 2000 MSDN Library? Before anyone asks, this behavior occurs with the VFP base controls and has nothing to do with my framework.
Just curious,
Daniel