Solved

Making a Control Array as in VB

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sending Gmail through Delphi 3 108
Firemonkey webbrowser scrollbars ? 1 38
DBGrid or StringGrid ? 6 88
enhance the following code 3 31
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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.

773 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