Sipke Wadman
2008-08-30 15:59:04 UTC
Hi,
I want to create TEdit boxes at runtime. I am using;
TEdit *Edit = new TEdit(this);
Edit->Parent = this;
That is working fine, but now I want to create an array of varying size of
them. I would think the following would work, as it does with 'normal'
types, but of course it does not;
TEdit **Edit = new *TEdit[10];
for (int x=0;x<10;x++){
Edit[x] = new TEdit(this);
Edit[x]->Parent = this;
}
The following seems to be working fine, but then I cannot adjust the number
of boxes at runtime;
TEdit *Edit[10]
for (int x=0;x<10;x++){
Edit[x] = new TEdit(this);
Edit[x]->Parent = this;
}
Anyone that can help me with this? I suppose it is really easy.
Thanks,
Sipke
I want to create TEdit boxes at runtime. I am using;
TEdit *Edit = new TEdit(this);
Edit->Parent = this;
That is working fine, but now I want to create an array of varying size of
them. I would think the following would work, as it does with 'normal'
types, but of course it does not;
TEdit **Edit = new *TEdit[10];
for (int x=0;x<10;x++){
Edit[x] = new TEdit(this);
Edit[x]->Parent = this;
}
The following seems to be working fine, but then I cannot adjust the number
of boxes at runtime;
TEdit *Edit[10]
for (int x=0;x<10;x++){
Edit[x] = new TEdit(this);
Edit[x]->Parent = this;
}
Anyone that can help me with this? I suppose it is really easy.
Thanks,
Sipke