Solved

Can delphi 6 handle array with control objects like vb does?

Posted on 2001-07-25
3
211 Views
Last Modified: 2010-04-06
In VB you can create a an array (0-256) of control objects (say cmdButton(0) to cmdButton(255).

I have heard that earlier version of delphi does not allow this and user have to create each command button individually.
0
Comment
Question by:jasonyytan
  • 3
3 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6319760
listening ...
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6319781
a possibilty, not limited to 255

var
  btnlist : TList;
  i : Integer;
  B : TButton;
begin
  for i := 0 to Whateverend do
  begin
     b := tbutton.Create(self);
     //additional property settings
     btnlist.add(b);
   end;
end;

accessable through list index like

TButton(btnList[WhateverIndex]).Caption := Whatevertext;

meikl ;-)
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 50 total points
ID: 6319790
appendix
sample not limited to d6
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

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…
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

810 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