Solved

Enable components at run-time

Posted on 1998-09-04
2
131 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
TVirtualStringTree  search using TEdit 7 106
Virtuailstring tree compare node issue 14 104
Create Database on Android via Delphi dbExpress 3 79
Reconfigure Delphi Install? 2 45
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…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

919 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now