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
Solved

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

Posted on 2001-07-25
3
213 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

828 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