KK,
>Because I tried to save the code generated by Class Browser in .PRG, but an error message 'Syntax Error' generated. So I want to know how to write it.
The class browser (CB)
does not produce executable code if there is more than 1 level of containership involved. Your grid puts the textbox 3 levels of containership deep, so you are out of luck. The CB output is only for documentation purposes.
>I use VFP3.0B. For the TextBox control, does it has Text property in VFP5.0.
The textbox class did not change between 3 and 5. You use the .Value property to access the current text of the control.