• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

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

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
jasonyytan
Asked:
jasonyytan
  • 3
1 Solution
 
kretzschmarCommented:
listening ...
0
 
kretzschmarCommented:
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
 
kretzschmarCommented:
appendix
sample not limited to d6
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now