troubleshooting Question

Creating a TButton on the fly

Avatar of Hornwood
HornwoodFlag for South Africa asked on
ProgrammingDelphi
1 Comment1 Solution1023 ViewsLast Modified:
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
SteveBay

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros