Solved

Enable components at run-time

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

770 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