unit Main;

interface

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

type
  TMainForm = class(TForm)
    ListBox1: TListBox;
    Panel1: TPanel;
    BitBtn1: TBitBtn;
    procedure BitBtn1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
    
  private

  public
	lb2 : UMListBoxMce;
  end;

var
  MainForm: TMainForm;

implementation
{$R *.dfm}

procedure TMainForm.BitBtn1Click(Sender: TObject);
begin
	Close();
end;

procedure TMainForm.FormShow(Sender: TObject);
begin
	ListBox1.Clear();

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


	lb2        := UMListBoxMce.Create(Self);
	// konieczne:
   lb2.Parent := MainForm;
   lb2.Left   := ListBox1.Left + ListBox1.Width + 10;
   lb2.Top    := ListBox1.Top;
   lb2.Width  := ListBox1.Width;
   lb2.Height := ListBox1.Height;
end;

end.

