Solved

Making a Control Array as in VB

Posted on 1997-11-06
1
180 Views
Last Modified: 2010-04-04
i would like to make a Control Array as in VB. (ex.) a control array of TPanel's. Each panel will have the same name but have an index to indicate which one is selected.
most components in VB have a index property just for this purpose, but Delphi components do not that i'm aware of.
thanks for the help in advance.

Jeff
0
Comment
Question by:jalleman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
mirek071497 earned 50 total points
ID: 1349679
You can do this in many ways.

1.define a: array[0..10] of TPanel
2.create tpanels with unique name with number of panel added at the end.

for i:=1 to n do
begin
  with TPanel.Create(..) do
  begin
     name := 'MyPanel'+IntToStr(i);
  end;
end;

then you can use findcomponent to acces this panels.

example : TPanel(findcomponent('MyPanel1')).left := 20;


0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

707 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