property Name:string read FName write FName default 'abc';为什么这个设置默认值不行了,谢谢各位

解决方案 »

  1.   

    default的本身含义就不是设默认值,你望文生义了
      

  2.   

    但是如果是Boolean就可以啊 default false;
      

  3.   

    The default directive must be followed by a constant of the same type as the property. For example,property Tag: Longint read FTag write FTag default 0;
    NoteProperty values are not automatically initialized to the default value. That is, the default directive controls only when property values are saved to the form file, but not the initial value of the property on a newly created instance.我就不翻译了,呵呵》》中文就是:default的本身含义就不是设默认值,你望文生义了
      

  4.   

    thanks very much ,各位兄台,谢谢