Советы по Delphi


TEdit и событие OnEnter


    interface

uses

SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;
type
TNewComponent = class(TEdit)

private { Private declarations } protected { Protected declarations } procedure DoEnter; OverRide; public { Public declarations } constructor Create(AOwner: TComponent); OverRide; destructor Destroy; Override; published { Published declarations } end;
procedure Register;

implementation

procedure
TNewComponent.DoEnter;
begin
inherited
DoEnter; <нужный вам код> end;

destructor TNewComponent.Destroy;
begin
inherited
destroy; end;

constructor TNewComponent.Create(AOwner: TComponent);
begin
inherited
Create(AOwner);
end;

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

end.

[001615]



Содержание раздела