Property Str:string read FStr write FStr;

解决方案 »

  1.   

    private
        { Private declarations }
        Fstr : String ;  
        procedure Setstr(value : String)
      protected
        { Protected declarations }
      public
        { Public declarations }
      published
        { Published declarations }
        property Str : String  read Fstr write Setstr ; 
      end;在过程Setstr中写:Fstr := value
      

  2.   

    我写的程序和 kuangning说的一样。但在编辑时在Object Inspector中编辑的Str属性,在运行时还是空串,如果在运行时给他赋值,就正常了怎么回事?