Ich greif das Thema nochmal auf. Ich habe jetzt folgenden Code:
Delphi-Quellcode:
procedure TForm1.ffnen1Click(Sender: TObject);
var
FileName: string;
begin
OpenDialog1.Execute;
if LowerCase(ExtractFileExt(FileName))='.htm; .html' then;
PageControl1.ActivePage := TabSheet1;
SynEdit1.Lines.LoadFromFile(OpenDialog1.FileName);
if LowerCase(ExtractFileExt(FileName))='.php; .php3; .php4; .dat' then;
PageControl1.ActivePage := TabSheet2;
SynEdit2.Lines.LoadFromFile(OpenDialog1.FileName);
if LowerCase(ExtractFileExt(FileName))='.pas' then;
PageControl1.ActivePage := TabSheet3;
SynEdit3.Lines.LoadFromFile(OpenDialog1.FileName);
if LowerCase(ExtractFileExt(FileName))='.h; .c; .cs; .hh; .cpp' then;
PageControl1.ActivePage := TabSheet4;
SynEdit4.Lines.LoadFromFile(OpenDialog1.FileName);
end;
Das File wird aber in alle SynEdits geladen. Was mache ich dagegen?
Grolle