Thema: Delphi TStringList als Result

Einzelnen Beitrag anzeigen

shmia

Registriert seit: 2. Mär 2004
5.508 Beiträge
 
Delphi 5 Professional
 
#6

Re: TStringList als Result

  Alt 8. Jun 2004, 09:07
Nö, eher so:
Delphi-Quellcode:
class function TForm2.GetUserInput(List: TStrings): Boolean;
begin
  with TForm2.Create(nil) do
  begin
    try
       Result := (ShowModal = mrOK); // Bediener entscheidet mit OK oder Cancel-Button
       if Assigned(List) then
         List.Add(Edit1.Text);
    finally
       Free;
    end;
  end;
end;
Andreas
  Mit Zitat antworten Zitat