I create several runtime TRadioGroup:
Rdb1:= TRadioGroup.Create(Painel);
But with the same name "Rdb1". My question is how do I get the value of the field that was selected. I tried to do this:
Rdb1.OnExit := Validacao;
procedure TFCad_AnaliseDeTendencias.Validacao(Sender: TObject);
begin
if Rdb1.ItemIndex = 1 then
begin
showmessage('Acertou');
end;
But since I have several "Rdb1" it only takes the value of the last created RadioGroup. Is there a way I can get the value of the RadioGroup that was "Clicked / Selected"?