把我自己的事件代替原有的事件(50分)

  • 主题发起人 主题发起人 shbjkl
  • 开始时间 开始时间
To:影子
如果不是KeyPress,而是OnEnter,應該怎麼做?
nit Edit1;

interface

uses
Windows, Messages, SysUtils, Classes, Controls, StdCtrls;

type
TEdit1 = class(TEdit)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
protected
procedure OnEnter;override;
published
{ Published declarations }
end;

procedure Register;

implementation

procedure Register;
begin
RegisterComponents('Samples', [TEdit1]);
end;

{ TEdit1 }


{ TEdit1 }

procedure TEdit1.OnEnter;
begin
inherited;

end;

end.

錯誤提示:Method 'OnEnter' not found in base class
 
To:影子
不好意思,我已經知道了,原來不叫OnEnter,是叫DoEnter!
 
后退
顶部