Registriert seit: 27. Nov 2017
2.508 Beiträge
Delphi 7 Professional
|
AW: Default property überladen
19. Mai 2021, 11:24
Delphi-Quellcode:
unit MyListBox;
interface
uses
SysUtils, Classes, Controls, StdCtrls, Dialogs, Graphics;
type
TMyListBox = class(TListBox)
public
constructor Create(AOwner: TComponent); override;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents(' Samples', [TMyListBox]);
end;
constructor TMyListBox.Create(AOwner: TComponent);
begin
inherited create(AOwner);
if (csDesigning in ComponentState) then Exit;
Color := clLime;
end;
end.
Geändert von Delphi.Narium (19. Mai 2021 um 11:31 Uhr)
|
|
Zitat
|