unit Main;

interface

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

type
  TMainForm = class(TForm)
    ListBox1: TListBox;
    Panel1: TPanel;
    imgKONIEC: TImage;
    UpDown1: TUpDown;
    procedure UpDown1Click(Sender: TObject; Button: TUDBtnType);
    procedure FormShow(Sender: TObject);
    procedure imgKONIECClick(Sender: TObject);

  private

  public

  end;

var
  MainForm: TMainForm;

implementation

{$R *.dfm}

procedure TMainForm.FormShow(Sender: TObject);
begin
   ListBox1.SetFocus();
   ListBox1.ItemIndex := 0;
   UpDown1.Position   := ListBox1.ItemIndex;
end;

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

procedure TMainForm.UpDown1Click(Sender: TObject; Button: TUDBtnType);
begin
   ListBox1.ItemIndex := UpDown1.Position;
end;

end.
