1 procedure Mainform.SetField(Sender: TField; var Text: string; 2 DisplayText: Boolean); 3 begin 4 Text := Sender.AsString ; 5 end; 6 7 procedure TClientform.UniQuery1AfterOpen(DataSet: TDataSet); 8 var 9 i :Integer ; 10 begin 11 with DataSet do 12 begin 13 DisableControls ; 14 try 15 for i := 0 to FieldCount -1 do 16 begin 17 if Fields[i] is TMemoField then 18 Fields[i].OnGetText := Mainform.SetField; 19 end; 20 finally 21 EnableControls ; 22 end; 23 end; 24 end;