Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
error 1.1 400 Bad request idhttp delphi 18 55
How to renew a Delphi rad-studio licence? 5 49
Firemonkey webbrowser scrollbars ? 1 29
DBGrid or StringGrid ? 6 71
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…
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…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

867 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

16 Experts available now in Live!

Get 1:1 Help Now