unit UMyListBox;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type

UMListBox = class(TListBox)
public
    procedure  CreateWnd; override;
    procedure  DestroyWnd; override;
	constructor Create(AOwner: TComponent); override;
end;

procedure Register();

implementation
{------------------------------------------------------------------------------}

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

procedure UMListBox.CreateWnd();
begin
	inherited;

   Items.Add('Styczeń');
   Items.Add('Luty');
   Items.Add('Marzec');
   Items.Add('Kwiecień');
   Items.Add('Maj');
   Items.Add('Czerwiec');
   Items.Add('Lipiec');
   Items.Add('Sierpień');
   Items.Add('Wrzesień');
   Items.Add('Październik');
   Items.Add('Listopad');
   Items.Add('Grudzień');
end;

procedure UMListBox.DestroyWnd();
begin
   Clear();

	inherited;
end;

procedure Register();
begin
	RegisterComponents('MyComponents', [UMListBox]);
end;

end.

