March 2000
Intermediate to advanced
576 pages
18h 13m
English
Override Directive
Subroutine declaration; override;Use the override directive to declare a method
that overrides a virtual or
dynamic method declared in a base class. Refer to
Chapter 2 for a discussion of virtual methods and
polymorphism.
type
// Tile a bitmap.
TTile = class(TGraphicControl)
private
fBitmap: TBitmap;
procedure SetBitmap(NewBitmap: TBitmap);
procedure BitmapChanged(Sender: TObject);
protected
procedure Paint; override;
public
constructor Create(Owner: TComponent); override;
destructor Destroy; override;
published
property Align;
property Bitmap: TBitmap read fBitmap write SetBitmap;
property OnClick;
// Many other properties are useful, but were omitted to save space.
// See TControl for a full list.
end;| Class Keyword, Dynamic Directive, Function Keyword, Inherited Keyword, Procedure Keyword, Reintroduce Directive, Virtual Directive |
Read now
Unlock full access