Autor Beitrag
Licki
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 132

Knoppix, Win 95, Win 2000, Win NT, Win 98, Win XP
Delphi 3
BeitragVerfasst: Do 01.04.04 10:14 
Hallo.

Ich habe ein Problem mit TListBox. Hier erstmal der Code:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
procedure GetApo;
var
 SR: TSearchRec;
 localDir: String;
 FileName: String;
begin
 if FindFirst(localDir + '*.*', faAnyFile, SR) = 0 then
  begin
   repeat
    if (SR.Attr <> faDirectory) then
     begin
      FileName := localDir + SR.Name;
      ListBox.Items.Add(FileName);
   until FindNext(SR) <> 0;
  FindClose(SR);
 end;
end;

procedure Tapo_edit.FormCreate(Sender: TObject);
begin
 GetApo;
end;


Nun habe ich eine ListBox auf mein Formular gesetzt und es "ListBox" genannt. Doch wenn das Programm läuft, sagt er mir "Undefinierter Bezeichner: ListBox".

Worin liegt der Fehler?

Moderiert von user profile iconMotzi: Thema verschoben
Chatfix
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: Do 01.04.04 11:10 
Probiers mal mit apo_edit.ListBox.

Da deine Procedure nicht mit Tapo_edit deklariert wurde findet er die ListBox nicht...

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce