Autor Beitrag
chriss1988
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 389

windows xp prof,home,windows98
delphi5
BeitragVerfasst: Mi 14.12.05 10:24 
hi

wir sollen als HA ein programm mir einem radiogroup basteln.
es funktioniert auch alles wunderba bis ich zu dem teil mit der fehlermeldung komme(wie gestern).

gestern habe ich es mit nem radiobutton so gemacht
ausblenden Delphi-Quelltext
1:
If (not radiobutton1.checked)then ...					


doch mit ner rediogroup funktioniert das net. kann mir da jemand helfen.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
Tauschgeld:=strtofloat(edit1.text);

case radiogroup1.itemindex of
 0: Waerung:=USDollar;
 1: Waerung:=SchwedischeKronen;
 2: Waerung:=TuerkischeLiere;
 end;
Betrag:=Waerung*Tauschgeld;


if(not  radiogroup1.itemindex.Waerung )then    //hier bringt er fehler
begin
Betrag:=0;
label4.caption:=('Fehler');
label4.visible:=true;
Timer1.Enabled:=true;

end;
edit2.text:=floattostrf(Betrag,fffixed,9,3);
end;


da is der erste fehler.
der zweite trit bei mir beim clearen auf
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
  edit1.clear;
  edit2.clear;
  edit1.setfocus;
  label4.visible:=false;
  zaehler:=0;
  radiogroup1.ItemIndex:=false;    //hier bringt er fehler


Moderiert von user profile iconTino: Titel geändert.
chriss1988 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 389

windows xp prof,home,windows98
delphi5
BeitragVerfasst: Mi 14.12.05 10:35 
fehler eins hab ich selbst gefunden war leicht
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
procedure TForm1.BitBtn1Click(Sender: TObject);  
begin  
Tauschgeld:=strtofloat(edit1.text);  

 
case radiogroup1.itemindex of  
 0: Waerung:=USDollar;  
 1: Waerung:=SchwedischeKronen;  
 2: Waerung:=TuerkischeLiere;
else
Betrag:=0;  
label4.caption:=('Fehler');  
label4.visible:=true;  
Timer1.Enabled:=true;   
 end;  
Betrag:=Waerung*Tauschgeld;


aber fehler 2 hab ich KA
Kroko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1284

W98 W2k WXP
Turbo D
BeitragVerfasst: Mi 14.12.05 10:36 
ItemIndex ist eine Integer-Zahl uind kein Boolean
es wird angeben, der wievielte Eintrag gedrückt wurde!

_________________
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden! oder Wer lesen kann, ist klar im Vorteil!
chriss1988 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 389

windows xp prof,home,windows98
delphi5
BeitragVerfasst: Mi 14.12.05 10:54 
und wie bekomme ich eine radiogroup gecleart

ausblenden Delphi-Quelltext
1:
radiogroup1.clear					


??????????????????????????
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Mi 14.12.05 11:11 
Hallo,
ausblenden Delphi-Quelltext
1:
RadioGroup1.Items.Clear;					

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
chriss1988 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 389

windows xp prof,home,windows98
delphi5
BeitragVerfasst: Mi 14.12.05 11:18 
jetz löscht er alles was in dem ding drin steht.
er soll aber nur die aktivierung löschen also das was ich kurz vorher angeklickt habe

(ihr wisst schon den kleinen schwaren punkt)
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Mi 14.12.05 11:28 
Hallo,
dann so:
ausblenden Delphi-Quelltext
1:
RadioGroup1.ItemIndex := -1;					

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
chriss1988 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 389

windows xp prof,home,windows98
delphi5
BeitragVerfasst: Mi 14.12.05 11:31 
danke jetzt gehts

ich hab immer radiobutton1.itemindex:=0; das ging net