已经构件在PUBIC定义了CREATE构造器,如何再重新定义onCreate事件呢?
http://expert.csdn.net/Expert/topic/1723/1723430.xml?temp=.3397791

解决方案 »

  1.   

    有关的上续问题请参考:
    http://expert.csdn.net/Expert/topic/1723/1723430.xml?temp=.3397791
      

  2.   

    procedure SetParent(AParent: TWinControl); override;
      

  3.   

    property OnCreate;
    提示基类中没有该方法。
      

  4.   

    to: rustle:
    procedure SetParent(AParent: TWinControl); override;有什么作用?
    具体应该如何应用?
      

  5.   

    应该在给Parent属性赋值的时候做你要做的事情所以应该在它的读写器下手
      

  6.   

    TMyOncreate = procedure(sender: TObject);private
      FMyOncreate:TMyOncreate;
    published
      property MyOncreate:TMyOncreate read FMyOncreate write FMyoncreate;procedure Tmyclass.Oncreate(sender: Tobjece);
    begin
      If assigned(FMyoncreate) then FMyoncreate(sender);
    end;结贴吧!!!!!!!!
      

  7.   

    var 
     FOnCreate:TNotifyEvent
    protected
     procedure DoOnCreate;dynamic;
    publised
     property OnCreate:TNotifyEvent read FOnCreate write FOnCreate;
    ...
    procedure DoOnCreate;dynamic;
    begin
     if assignes(FOnCreate) then FOnCreate(self);
    end;
      

  8.   

    加入以上代码后出现巨多错误,请大家看看。哎,我现在被卡在这动也不能动了。
    错误如下:    Field definition not allowed after methods or properties
        Published property 'MyOnCreate' cannot be of type PROCEDURE
        Undeclared idextifier:'OnCreate'
        Undeclared identifier:'FMyOnCreate'
        Incompatible types
      

  9.   

    问题仍未解决,但先结了本贴再说。先谢谢huojiehai(海天子) 等朋友的帮助,本人发本帖的时候忘记了加到100分,所以另开一帖。
    http://expert.csdn.net/Expert/topic/1728/1728080.xml?temp=.3493463楼上的错误是huojiehai(海天子) 朋友帖出的程序运行时发生的错误。
    hkbarton(我是好人) 的我再来测试。