I need to create DYNAMICALLY some objects within other objects. The pseudocode I want goes something like this:
// on click of a button
For iLoop := 1 to iNoOfPanelsToDo do
// Create a panel
// give it a cyclic name ('panel001')
// set its size and location on the form by Top := iLoop*20 etc.
// Create a child panel on the above panel
// give it a cyclic name ('innerpanel001')
// set its size and location on the form
// Create a button on the innerpanel
// Attach procedure 'InnerButtonPressed' to the button's OnClick event
I've stumbled through the Delphi Help but I cant seem to find anything like this in terms I've guessed to put in the search, yet I suspect it is something the more experienced Delphi people will know like the back of their hand. I did it before ages ago; all I can remember is the bit about accessing the dynamically-created components by name with FindComponent.
Sample code is best; I learn well from plagiarism; oops, I mean example.
We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.
The uses clause is one of those things that just tends to grow and grow.
Most of the time this is in the main form, as it's from this form that all others are called.
If you have a big application (including many forms),
the uses clause in the in…
Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview. I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210 (2 * 3 * 5 * 7) or 2310 (2 * 3 * 5 * 7 * 11).
The larger templa…