Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Create Array Of EditBox?

Status
Not open for further replies.

austin363

Programmer
Mar 24, 2002
1
TH
if I have to create a hundred of Editbox and Each Editbox must Show the same Message="Hello".I have to Write from edit1 to edit100 like this
Edit1->Text:=''Hello";
Edit2->Text:=''Hello";
Edit3->Text:=''Hello";
Edit4->Text:=''Hello";
.
.
.
Edit99->Text:=''Hello";
Edit100->Text:=''Hello";
My program is Quite long!
Do you Have any way to make my program Shotter such as use array or somethings ?

Thanks for your advise
 
TEdit *EditArray[100];

for (int i=0;i<100;i++)
EditArray =new TEdit(this);

this is a pointer to the present component.
Now you have an array of 100 EditBoxes.
Of course you have to update now the properties of this EditBoxes at runtime as they were not created on designtime Wim Vanherp
Wim.Vanherp@belgacom.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top