想实现什么?procedure ClearEditFlags(this:TComponent);
var
  i:longint;
begin
   this.Tag := 0;
   with this as TForm do begin
      for i := 0 to ComponentCount - 1 do begin
         if Components[i] is TCustomEdit then
            TCustomEdit(Components[I]).Modified := FALSE;
         Components[i].Tag := 0;
      end;
   end;
end;

解决方案 »

  1.   

    把这个窗体中所有文本框的“修改过?”状态都置为否,是不是在保存了什么东西之后调用的?注意一下各种文本编辑器状态栏里的“Modified”之类的提示出现的规律就明白了吧。至于Tag,可以代表任何你想代表的东西,说不好是干什么用的,得联系上下文。
      

  2.   

    循环查找窗体中的控件,将所有控件的tag值设置为0,属于tcustonedit类的控件modified属性设置为假