Thema: Delphi Button enable / disable

Einzelnen Beitrag anzeigen

Landogar-Garuno

Registriert seit: 22. Feb 2008
36 Beiträge
 
#8

Re: Button enable / disable

  Alt 28. Feb 2008, 19:13
Hallo alle zusammen
könnt ihr mal schauen was ich falsch gemacht habe.

[/delphi]
procedure TForm1.FormShow(Sender: TObject);


begin


Button1.Enabled := FileExists( 'file.xxx,');
if FileExists('file.xxx') then
Label4.Caption:=('file found')
else
Label4.Caption:='file not found';

Button1.Enabled := DirectoryExists( 'C:\TEST\myProject');
if DirectoryExists('C:\TEST\myProject') then
Label5.Caption:=(' Ordner gefunden')
else
Label5.Caption:='Ordner nicht gefunden';

mein Problem is wenn eins von beiden vorhanden ist, ist der button enable
  Mit Zitat antworten Zitat