AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Ordinaltyp bei case of

Ein Thema von manialf · begonnen am 23. Sep 2006 · letzter Beitrag vom 24. Sep 2006
 
manialf

Registriert seit: 23. Sep 2006
3 Beiträge
 
#1

Ordinaltyp bei case of

  Alt 23. Sep 2006, 18:28
Hallo,

ich habe jetzt seit 2 Wochen Info und wir sollen eine Ampel programmieren. ich bin jetzt soweit:
Problem: In der zeile case zustand of kommt die Meldung Ordinaltyp benötigt. keine Ahnung wie das geht. Hoffe auf eure Hilfe...

Delphi-Quellcode:
implementation

{$R *.dfm}

procedure TForm1.Button2Click(Sender: TObject);
begin
halt;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin

w:= 390;
h:= 510;

setbounds((screen.Width-w)div 2,(screen.Height-h)div 2,w,h)

end;

procedure TForm1.Button1Click(Sender: TObject);
begin

case 'zustandof

1: begin
   Sh_red.Brush.Color :=clRed;
   Sh_yellow.Brush.Color :=clWhite;
   Sh_lime.Brush.Color:=clWhite;
    end;

2: begin
   Sh_red.Brush.Color :=clRed;
   Sh_yellow.Brush.Color :=clYellow;
   Sh_lime.Brush.Color:=clWhite;
    end;

3: begin
   Sh_red.Brush.Color :=clWhite;
   Sh_yellow.Brush.Color :=clWhite;
   Sh_lime.Brush.Color:=clLime;
    end;

4: begin
   Sh_red.Brush.Color :=clWhite;
   Sh_yellow.Brush.Color :=clYellow;
   Sh_lime.Brush.Color:=clLime;
    end;

end;

if zustand >4 then zustand := 1;

end;

end.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:13 Uhr.
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