Autor Beitrag
XpreZz
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35



BeitragVerfasst: Di 18.01.05 11:25 
Huhu !
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
procedure TFRM_Euro.BTN_ResetClick(Sender: TObject);
begin
  EDT_Z1.Clear;
  EDT_Z2.Clear;
  EDT_Z3.Clear;
  EDT_Z4.Clear;
  EDT_Z5.Clear;
  EDT_Z6.Clear;
  EDT_Z7.Clear;
  EDT_Z8.Clear;
  EDT_Z9.Clear;
  EDT_Z10.Clear;
  EDT_Z11.Clear;
  EDT_Z12.Clear;
  EDT_Ausgabe.Clear;

end;


Beim Klick dieses Buttons wird der Inhalt, ob Text oder Zahl, gelöscht und das Edit Feld kehrt in den leeren Ausgangszusatnd zurück. Nun habe ich eine Rechnung nach der bei einem bestimmten Ergebnis ein Label auftaucht. Das sieht wie folgt aus:

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
procedure TFRM_Euro.BTN_BerechnenClick(Sender: TObject);
var
   z1, z2, z3, z4, z5, z6, z7, z8, z9, z10, z11, z12 : longint;
   quer : integer;
   pz : integer;
begin
  quer := 0;
  z1 := StrToInt (LBL_Land.Caption);
  z2 := StrToInt (EDT_Z2.Text);
  z3 := StrToInt (EDT_Z3.Text);
  z4 := StrToInt (EDT_Z4.Text);
  z5 := StrToInt (EDT_Z5.Text);
  z6 := StrToInt (EDT_Z6.Text);
  z7 := StrToInt (EDT_Z7.Text);
  z8 := StrToInt (EDT_Z8.Text);
  z9 := StrToInt (EDT_Z9.Text);
  z10 := StrToInt (EDT_Z10.Text);
  z11 := StrToInt (EDT_Z11.Text);
  z12 := StrToInt (EDT_Z12.Text);
  pz := (z1+z2+z3+z4+z5+z6+z7+z8+z9+z10+z11+z12);
  repeat
    quer := quer + pz mod 10;
    pz  := pz div 10;
  until pz = 0;
  EDT_Ausgabe.Text := IntToStr (quer);
   if quer = 8 then begin
                       LBL_True.Caption := 'echt.';
                       LBL_True.Visible := true;
                    end
                else begin
                       LBL_True.Caption := 'gefälscht.';
                       LBL_True.Visible := true;
                     end;

end;


Ich will das Label (LBL_True) nun ebenfalls mit dem Button (BTN_Reset) entfernen allerdings geht dies nicht mit LBL_True.Clear. Was tun ?!


Moderiert von user profile iconTino: Topic aus Sonstiges verschoben am Di 18.01.2005 um 11:25
Stübi
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 331

Win XP, Win 2000, Win ME
D5 Ent, D7 Prof, D2005 PE, C#
BeitragVerfasst: Di 18.01.05 11:29 
ausblenden Delphi-Quelltext
1:
LBL_True.caption := '';					


Gruss Stübi

_________________
Neun von zehn Stimmen in meinen Kopf sagen, dass ich nicht verrückt sei. Die zehnte summt die Tetrismelodie.


Zuletzt bearbeitet von Stübi am Di 18.01.05 11:30, insgesamt 2-mal bearbeitet
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6393
Erhaltene Danke: 147

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 18.01.05 11:29 
ausblenden Delphi-Quelltext
1:
LBL_True.Caption := '';					
XpreZz Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35



BeitragVerfasst: Di 18.01.05 11:32 
Ich danke euch beiden. Genau das war es, was ich gesucht habe.