TPAKTOP
asked on
Text Boxes!
HI!
I am currently working on project where i have to create, requested by user number of EditBoxes! And after user enters values in those boxes and presess button, all these values from editboxes should be stored in array!
Any Ideas.
Thanx!
I am currently working on project where i have to create, requested by user number of EditBoxes! And after user enters values in those boxes and presess button, all these values from editboxes should be stored in array!
Any Ideas.
Thanx!
ASKER
Actually i would like to get an answer for both. However storing contents is more important!
Thanx!
Thanx!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hey Doc,
You got me on the turn.
I should answer the same way.
;-)
Jo.
You got me on the turn.
I should answer the same way.
;-)
Jo.
I guess it would be better to use a linked list, so can have a variable number of EditBoxes.
PNode=^TNode;
TNode=Record
Edit:TEditBox;
Next:PNode;
End;
(I used a Record, you can also use an Object or a Class)
PNode=^TNode;
TNode=Record
Edit:TEditBox;
Next:PNode;
End;
(I used a Record, you can also use an Object or a Class)
There's no need to use a link list... just make the arrays openended..
Var EditArray :array of Tedit;
begin
SetLength(EditArray,Length (EditArray )+1);
EditArray[length(editArray )]:=Tedit. create(sel f);
yada,
yada,
yada,
(You get the idea....)
Var EditArray :array of Tedit;
begin
SetLength(EditArray,Length
EditArray[length(editArray
yada,
yada,
yada,
(You get the idea....)
Place all created TEdit controls on a Panel or a GroupBox. Then you can loop throw Controls property of container and save TEdit values into your array or list.
By this method you have the number of created EditBoxes on ControlCount property and EditBoxes in Controls[0] to Controls[ControlCount-1].
I hope this helps
By this method you have the number of created EditBoxes on ControlCount property and EditBoxes in Controls[0] to Controls[ControlCount-1].
I hope this helps
Which is the problem: creating EditBox or storing it's content in array?
(Ru or Bg?)
Jo.