
08.01.2009, 17:58
|
|
Флудер
Регистрация: 18.01.2005
Сообщений: 2,298
Провел на форуме: 13936387
Репутация:
1844
|
|
Сообщение от ZET36
немогу понять почему вылетает ошибка нажатии на элемент ListBox'a
Код:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button2: TButton;
ListBox1: TListBox;
procedure Button2Click(Sender: TObject);
procedure ListBox1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
a: integer;
putmas: array[1..5] of string;
implementation
{$R *.dfm}
procedure TForm1.Button2Click(Sender: TObject);
begin
ListBox1.Items.Add('ererwe');
ListBox1.Items.Add('укукуцк');
a:=0;
end;
procedure TForm1.ListBox1Click(Sender: TObject);
begin
putmas[a]:= Listbox1.Items[ListBox1.ItemIndex];
showmessage(putmas[a]);
end;
end.
Что за ошибка? Компилить исходник сейчас возможности нет..
|
|
|