Here's an option go ?:
There is an array a: array [1..100] of TRadioButton; On FormCreate, they are created, or the array is filled with references to already existing objects.
In the description of the form you add the desired procedure, here:
type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); {--->}procedure SomeProcedure(Sender: TObject); private { Private declarations } public { Public declarations } end;
Further in the code after the word implementation you write:
procedure TForm1.SomeProcedure(Sender: TObject); begin {что-то делаешь... Sender здесь - объект который вызывает, Если точно знаешь что он TRadioButton, и хочешь получить доступ к его полям пишешь: (Sender as TRadioButton).свойство } end;
Now you specify this procedure for all objects by pressing for i: = 0 to 99 do a [i] .onClick: = SomeProcedure;
Well, like everything else to tell ...