C
cailihui
Unregistered / Unconfirmed
GUEST, unregistred user!
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
如果不是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