Autor Beitrag
thorstenf01
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 60

Win XP
D5 enterprise
BeitragVerfasst: Mo 25.08.03 17:31 
Hy,

ich habe folgendes Problem: zwei Groupboxen mit jeweils zwei TEdits sollen durch eine RadioGroup so gesteuert werden,daß die nicht ausgewählte Groupbox bzw.in der sich befindlichen TEdits "grau" hinterlegt werden, so daß keine Eingabe möglich ist. Wer kann helfen bzw. hat ein kleines Beispiel?

Danke im voraus

Gruß
Thorsten
LeVoS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: Mo 25.08.03 18:57 
Benutze doch einfach bei der onClick Routine
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
if Radio.itemindex=1 then
...
Groupbox1.Edit1.enabled:=true
Groupbox2.Edit1.enabled:=false
..
else
..
Groupbox2.Edit1.enabled:=true
Groupbox1.Edit1.enabled:=false
....

so in der Art einfach aber funzt ...

Moderiert von user profile iconTino: Delphi-Tags hinzugefügt.
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: Mo 25.08.03 19:03 
Folgend ein kleines Beispiel:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TForm1.RadioGroup1Click(Sender: TObject);
begin
  if RadioGroup1.Items[RadioGroup1.ItemIndex] = '1' then { Name erster Radiobutton }
    begin
      Edit1.Enabled := false;
      Edit2.Enabled := true;
    end;
  if RadioGroup1.Items[RadioGroup1.ItemIndex] = '2' then { Name zweiter Radiobutton }
    begin
      Edit2.Enabled := false;
      Edit1.Enabled := true;
    end;
end;

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
thorstenf01 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 60

Win XP
D5 enterprise
BeitragVerfasst: Mo 25.08.03 21:23 
Hy,
danke für eure Vorschläge.
Ich werde es testen...
Gruß
Thorsten