双击Picture就可以弹出一个Form,是如何连接进去的啊?
谢谢!

解决方案 »

  1.   

    通过属性编辑器(Property Editors),标准可编辑属性都实现了基本的Editor,自定义属性也可以实现自己的Editor,相关内容请看Delphi帮助的Component Writer's guide的Adding Property Editors章节或相关内容。
      

  2.   

    type
     TmyPro=class(TWinControl)
    protected
     readString:String;
     procedure writeString(Value:string);
    public property FormCaption:String read readString write writeString;end;TMypro.writeString;
    var
     Form1:TForm;
    begin
     form1:=TForm1.Create(self);
     form1.parent:=self;
     form1.caption:=inttostr(random(1000)+1203);
     form1.Showmodal;
     formcaption:=Form1.caption;
     form1.free;
    end;
      

  3.   

    在Delphi中,双击Image的Picture属性弹出的窗体,属于对话框形式的属性编辑器。
    Delphi中有专门注册属性编辑器的地方,把编辑好的属性编辑器注册到相应控件上即可。
    Unit xxxReg;
       RegisterPropertyEditor(TypeInfo(TPicture),TImage,
    'Picture',TPictureProperty);        //注册属性编辑器