Solved

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

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 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

23 Experts available now in Live!

Get 1:1 Help Now