哪位高手能写个代码让我看看,多谢了,在线等!!!!

解决方案 »

  1.   

    type
      TMyClass = class
      private
        FProp1: String;
        procedure SetProp1(value: String); 
      public
        prperty Prop1: String read FProp1 write SetProp1;
      end;procedure TMyClass.SetProp1(value: String);
    begin
      if FProp1 <> value then
        FProp1 := Value;
    end;
      

  2.   

    property定义
    具体看Delphi的OOP书籍http://lysoft.7u7.net
      

  3.   

    其中定义的READ和WRITE任可以选择的,根据不同需求
      

  4.   

    private
        
    var
        FProp1: String;
        procedure SetProp1(value: String); 
      published
       prperty Prop1: String read FProp1 write FProp1;
       prperty setProp1: String read setProp1 write setProp1;