Solved

Making a Control Array as in VB

Posted on 1997-11-06
1
176 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
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

11 Experts available now in Live!

Get 1:1 Help Now