![]() |
AW: a>=100
Zitat:
|
AW: a>=100
Na wenn die Ausgabe in einem Label z.B. der Inhalt der Variablen "RecordCount" ist, dann hast Du die Möglichkeit
Delphi-Quellcode:
oder aber
if RecordCount >100 then Panel1.colour:=blue;
Delphi-Quellcode:
Und wenn Du es halbwegs richtig machen willst, muß noch jede Menge Fehlerprüfung in die zweite Möglichkeit integriert werden. Dazu bin ich aber jetzt zu bequem.
if Strtoint(label1.caption)>100 then Panel1.Color:=blue;
Und wahrscheinlich ist die angestrebete Farbänderung sowieso davon abhängig welchen Wert "RecordCount" hat und nicht welchen Inhalt die Caption eines Labels. Gruß K-H |
AW: a>=100
Systematisiert ist dieser Ansatz in
![]() |
AW: a>=100
Zitat:
Beispiel: (Bitte so nicht programmieren. Da fehlt noch ganz viel und auf man(n) nutzt keine festen Links... ) Form:
Delphi-Quellcode:
Und den Record...(Auch hier: Bitte nicht auf Form1 usw. zugreifen)
TForm1 = class(TForm)
VorName: TEdit; PLZ: TEdit; Ort: TEdit; procedure AllChange(Sender: TObject); public Procedure Data2Form; Procedure Form2Data; { Public-Deklarationen } end; procedure TForm1.AllChange(Sender: TObject); begin Form2Data; end; Procedure TForm1.Data2Form; begin VorName.Text := StupidData.FVorName; PLZ.Text := StupidData.FPLZ; Ort.Text := StupidData.FOrt; end; Procedure TForm1.Form2Data; begin StupidData.FVorName := VorName.Text; StupidData.FPLZ := PLZ.Text; StupidData.FOrt := Ort.Text; end; Soll nur ein Beispiel sein...
Delphi-Quellcode:
Type
TStupidData = Record FVorName : String; FPLZ : String; FOrt : String; Procedure SetVorname(AValue : String); Procedure SetPLZ(AValue : String); Procedure SetOrt(AValue : String); Property VorName : String write SetVorName; Property PLZ : String write SetPLZ; Property ORT : String write SetOrt; end; var StupidData : TStupiddata; implementation Procedure TStupidData.SetVorname(AValue : String); begin FVorName := AValue; Form1.Data2Form; end; Procedure TStupidData.SetPLZ(AValue : String); begin FPLZ := AValue; Form1.Data2Form; end; Procedure TStupidData.SetOrt(AValue : String); begin FORT := AValue; Form1.Data2From; end; |
AW: a>=100
Hallo mal wieder! Luckie hat es ja schon auf den Punkt gebracht, aber vielleicht bedarf es noch einer etwas "anfänger-gerechteren" Erklärung.
Zitat:
![]() Besten Gruß, Michael |
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:55 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz