Delphi-PRAXiS
Seite 3 von 3     123   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi schleife will einfach nicht. (https://www.delphipraxis.net/109567-schleife-will-einfach-nicht.html)

DeddyH 4. Mär 2008 14:49

Re: schleife will einfach nicht.
 
Ich würde das eher so machen:
Delphi-Quellcode:
type
  TPingForm = class(TForm)
    ...
    private
      IsPing: Boolean;
    ...
  end;

procedure TPingForm.PingTimerTimer(Sender: TObject);
const sPing: array[Boolean] of String = ('Pong','Ping');
begin
  IsPing := not IsPing;
  Label1.Caption := sPing[IsPing];
end;

Fussball-Robby 4. Mär 2008 14:56

Re: schleife will einfach nicht.
 
Vom Prinzip her das gleiche, aber besser :wink:
Sitz hier nur grade in Informatik und langweile mich, hatte keine Lust, mir was besseres zu überlegen :-D


Alle Zeitangaben in WEZ +1. Es ist jetzt 11:50 Uhr.
Seite 3 von 3     123   

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz