Solved

Enable components at run-time

Posted on 1998-09-04
2
135 Views
Last Modified: 2010-04-04
With Dephi3 or 4,
how to enable components at run-time (dynamic) ?
In place of taking components and placing them to a form, i
want to initialize them when my program run (ONactivate).
For example, how to initialize +- 100 instances of Tshape
components and assign a different name to each :

Shape1
Shape2
...

Sorry for my English, but i am french.

Thanks everybody.
0
Comment
Question by:lgc5800
2 Comments
 
LVL 2

Accepted Solution

by:
rene100 earned 200 total points
ID: 1338639
hi

every component has a create method, which you have to use
for a tshape:

var
shape1: TShape; //shape1 ist the name
begin
shape1:=Tshape.create(self);
shape1.left:=0;
shape1.top:=0;
shape1.parent:=self; //self is the current form, if want a other
                     //form, just put in the name of it  
shape1.visible:=true;
end;

regards
rene

0
 

Author Comment

by:lgc5800
ID: 1338640
Thanks rene100, i have testing your solution
with drag and drop implement and all works good.

To see you later.

Jones.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question