Solved

Enable components at run-time

Posted on 1998-09-04
2
130 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
Comment Utility
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
Comment Utility
Thanks rene100, i have testing your solution
with drag and drop implement and all works good.

To see you later.

Jones.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

771 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

10 Experts available now in Live!

Get 1:1 Help Now