Hi I'm busy writing a procedure that can be used across a selection of buttons but I'm not sure how to refer to the button itself via variable at runtime.
I tried Form1('variable').caption := 'blah blah'; but of course it falls flat...
This is a simplified example that should explain it better...
Thank you in advance!
procedure changelabelname(Lname,Lcaption :string)
Form1.Lname.Caption := Lcaption;// Its the Lname that I would like to refer to via a variable...
//Calling the procedure for button 1
changelablename('button1','This is button1 label');
//For Button 2
changelablename('button2','This is button2 label');