Link to home
Start Free TrialLog in
Avatar of Hornwood
HornwoodFlag for South Africa

asked on

Creating a TButton on the fly

I'm new to Firemonkey and would like to populate a new HD form with a series of buttons of different sizes and colours dynamically dependant on requirement of the parameters selected.

Could somebody give me an example code snippet to do this in Firemonkey as I have tried adding the followin to the form on create event with no luck :-

procedure TMatrixForm.FormCreate(Sender: TObject);
var
    LButton:TButton;
begin
   LButton:=TButton.Create(Self);
   LButton.Align := TAlignLayout.alCenter;

Thanks

Tim
ASKER CERTIFIED SOLUTION
Avatar of SteveBay
SteveBay
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial