0
Create at runtime various Tradiogroup:
Rdb1:= TRadioGroup.Create(Painel);
But with the same name "Rdb1". My doubt is how I get the value of the field that was selected. I tried to do so:
Rdb1.OnExit := Validacao;
procedure TFCad_AnaliseDeTendencias.Validacao(Sender: TObject);
begin
if Rdb1.ItemIndex = 1 then
begin
showmessage('Acertou');
end;
However as I have several "Rdb1" it takes the value only of the last Radiogroup created. There is a way for me to get the value of Radiogroup that was "Clicked/Selected"?
Because you do not create the amount of radiogroup within a for, giving names to each of them after you need to get the value of a given radiogroup use Findcomponent by passing as parameter the name you gave. hugs!
– Jefferson Rudolf
" But as I have several "Rdb1" ... ". I could not understand. You can’t have multiple components with the same name. ?
– Victor Tadashi